hanahmily commented on code in PR #66:
URL: https://github.com/apache/skywalking-swck/pull/66#discussion_r902129687
##########
docs/java-agent-injector.md:
##########
@@ -111,6 +117,73 @@ volumes:
name: java-agent-configmap-volume
```
+### Use SwAgent CR to overlay default agent configuration
+
+The injector will read the SwAgent CR when pods creating.
+
+SwAgent CRD basic structure is like:
+
+```yaml
+apiVersion: operator.skywalking.apache.org/v1alpha1
+kind: SwAgent
+metadata:
+ name: swagent
+ namespace: skywalking-system
+spec:
+ containerMatcher: '.*'
+ selector:
+ app: demo
+ javaSidecar:
+ name: swagent
+ image: apache/skywalking-java-agent:8.8.0-java8
+ env:
+ - name: SW_LOGGING_LEVEL
+ value: "DEBUG"
+ sharedVolume:
Review Comment:
What will the `sharedVolume` do? Could you elaborate it in this doc?
##########
docs/java-agent-injector.md:
##########
@@ -111,6 +117,73 @@ volumes:
name: java-agent-configmap-volume
```
+### Use SwAgent CR to overlay default agent configuration
+
+The injector will read the SwAgent CR when pods creating.
+
+SwAgent CRD basic structure is like:
+
+```yaml
+apiVersion: operator.skywalking.apache.org/v1alpha1
+kind: SwAgent
+metadata:
+ name: swagent
+ namespace: skywalking-system
+spec:
+ containerMatcher: '.*'
+ selector:
+ app: demo
+ javaSidecar:
+ name: swagent
+ image: apache/skywalking-java-agent:8.8.0-java8
+ env:
+ - name: SW_LOGGING_LEVEL
+ value: "DEBUG"
+ sharedVolume:
+ name: "sky-agent"
+ mountPath: "/sky/agent"
+ swConfigMapVolume:
Review Comment:
From the `description`, this refers to the `default` configmap. Why do users
have to set up it since it's the deault?
##########
docs/java-agent-injector.md:
##########
@@ -44,14 +44,20 @@ inject-demo 1/1 Running 0 2d2h
The java agent injector supports a precedence order to configure the agent:
-``` Annotations > Configmap > Default configmap```
+``` Annotations > SwAgent CR > Configmap > Default configmap```
### Annotations
Annotations are described in [kubernetes annotations
doc](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/).
We support annotations in [agent
annotations](#Use-annotations-to-overlay-default-agent-configuration) and
[sidecar annotations](#configure-sidecar).
+### SwAgent CR
Review Comment:
Please remove `CR` here. We don't have to point out it's a custom resource.
##########
docs/java-agent-injector.md:
##########
@@ -44,14 +44,20 @@ inject-demo 1/1 Running 0 2d2h
The java agent injector supports a precedence order to configure the agent:
-``` Annotations > Configmap > Default configmap```
+``` Annotations > SwAgent CR > Configmap > Default configmap```
### Annotations
Annotations are described in [kubernetes annotations
doc](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/).
We support annotations in [agent
annotations](#Use-annotations-to-overlay-default-agent-configuration) and
[sidecar annotations](#configure-sidecar).
+### SwAgent CR
+
+Customer Resources are described in [kubernetes resources
doc](https://kubernetes.io/docs/concepts/extend-kubernetes/api-extension/custom-resources/).
Review Comment:
```suggestion
SwAgent is a [Customer
Resource](https://kubernetes.io/docs/concepts/extend-kubernetes/api-extension/custom-resources/)
defined by SWCK.
```
##########
docs/java-agent-injector.md:
##########
@@ -44,14 +44,20 @@ inject-demo 1/1 Running 0 2d2h
The java agent injector supports a precedence order to configure the agent:
-``` Annotations > Configmap > Default configmap```
+``` Annotations > SwAgent CR > Configmap > Default configmap```
Review Comment:
I highly recommend to remove the namespaced configmap which can be
substituted by `SwAgent`. If we though this pruning will affect too many
pieces, a `deprecated` label should be attached to it.
##########
docs/java-agent-injector.md:
##########
@@ -111,6 +117,73 @@ volumes:
name: java-agent-configmap-volume
```
+### Use SwAgent CR to overlay default agent configuration
+
+The injector will read the SwAgent CR when pods creating.
+
+SwAgent CRD basic structure is like:
+
+```yaml
+apiVersion: operator.skywalking.apache.org/v1alpha1
+kind: SwAgent
+metadata:
+ name: swagent
+ namespace: skywalking-system
+spec:
+ containerMatcher: '.*'
Review Comment:
The default value should be empty. If users don't specific this field, all
containers would get injected.
--
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]