Duncan-tree-zhou commented on PR #66:
URL: https://github.com/apache/skywalking-swck/pull/66#issuecomment-1208312481

   > Good idea. BTW, could we remove the `agent.config` mount? As we only need 
to read the default configmap (used for global configuration) and set the value 
through environment variables without creating a new configmap in user's 
namespace.
   
   It's good for me. If `swConfigMapVolume` was empty, configmap would not be 
mounted. 
   
   If `swConfigMapVolume` was set as:
   
   ```
   swConfigMapVolume:
          name:  "apm-customize-enhance-plugin"
          configMapName: "customize-enhance-config"
          configMapMountFile: "custom.config"
   ```
   
   than It would injected into pod as :
   
   ```
   spec:
       volumes:
       - name: "apm-customize-enhance-plugin"
         configMap:
              name: "customize-enhance-config"
       containers:
       - name: "demo"
         volumeMounts:
          - name: "apm-customize-enhance-plugin"
            mountPath: "/sky/agent/config/custom.config"
            subPath: "custom.config"
   ```
   
   let's suppose that the configmap like this:
   
   ``` yaml
   apiVersion: v1
   data:
     custom.config: |-
       # The service name in UI
       agent.service_name=${SW_AGENT_NAME:Your_ApplicationName}
   
       # Backend service addresses.
       
collector.backend_service=${SW_AGENT_COLLECTOR_BACKEND_SERVICES:oap:11800}
   
       logging.level=debug
       logging.output=CONSOLE
   
       # Please refer to 
https://skywalking.apache.org/docs/skywalking-java/latest/en/setup/service-agent/java-agent/configurations/#table-of-agent-configuration-properties
 to get more details.
   kind: ConfigMap
   metadata:
     name: customize-enhance-config
     namespace: default
   ```
   
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to