You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by GitBox <gi...@apache.org> on 2021/11/24 12:29:21 UTC

[GitHub] [skywalking-swck] dashanji opened a new pull request #50: add adapter e2e

dashanji opened a new pull request #50:
URL: https://github.com/apache/skywalking-swck/pull/50


   The PR is to add adapter e2e, which means the pod's replicas can be autoscaled according to the data of oap.


-- 
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: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [skywalking-swck] dashanji commented on a change in pull request #50: add adapter e2e

Posted by GitBox <gi...@apache.org>.
dashanji commented on a change in pull request #50:
URL: https://github.com/apache/skywalking-swck/pull/50#discussion_r756557631



##########
File path: test/e2e/oap-agent-adapter-hpa/e2e.yaml
##########
@@ -0,0 +1,106 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+setup:
+  env: kind
+  file: ../kind.yaml
+  steps:
+    - name: prepare e2e.yaml
+      command: bash hack/prepare-e2e.sh
+    - name: install cert-manager
+      command: |
+        # kind k8s cluster is in $TMPDIR
+        export KUBECONFIG=$TMPDIR/e2e-k8s.config
+        kubectl apply -f https://github.com/jetstack/cert-manager/releases/download/v1.3.1/cert-manager.yaml
+      wait:
+        - namespace: cert-manager
+          resource: pod
+          for: condition=Ready
+    - name: install operator
+      command: |
+        export OPERATOR_IMG=controller
+        make operator-docker-build   
+        kind load docker-image controller
+        make operator-install
+        make operator-deploy
+      wait:
+        - namespace: skywalking-swck-system
+          resource: pod
+          for: condition=Ready
+    - name: wait webhook installing
+      command: |
+        bash hack/wait-webhook.sh
+    - name: install metrics-adapter
+      command: |
+        export ADAPTER_IMG=metrics-adapter
+        make adapter-docker-build  
+        make adapter-deploy
+      wait:
+        - namespace: skywalking-custom-metrics-system
+          resource: pod
+          for: condition=Ready
+    - name: setup oapserver and ui
+      command: |
+        kubectl create namespace skywalking-system
+        grep -B20 "\-\-\-" test/e2e/skywalking-components.yaml | kubectl apply -f -
+      wait:
+        - namespace: skywalking-system
+          resource: OAPServer/skywalking-system
+          for: condition=Available
+    - name: setup java agent demo
+      command: |
+        kubectl label namespace skywalking-system swck-injection=enabled
+        sed 's/oap-service/skywalking-system-oap.skywalking-system/' test/e2e/demo.yaml | kubectl create -f -
+      wait:
+        - namespace: skywalking-system
+          resource: deployment/demo
+          for: condition=Available
+    - name: setup the hpa of java agent demo
+      command: |
+        kubectl apply -f test/e2e/hpa-demo.yaml
+  kind:
+    expose-ports:
+      - namespace: skywalking-system
+        resource: service/demo 
+        port: 8085
+      - namespace: skywalking-system
+        resource: service/skywalking-system-oap
+        port: 12800
+  timeout: 20m
+
+cleanup:
+  # always never success failure
+  on: always
+
+trigger:
+  action: http
+  interval: 30s

Review comment:
       yep, I think the `trigger` part will do 50 times in a very short time, and the interval is between the `trigger` part and the `verify` part. I will add a case to show the cpm(15+), which makes it easier to understand.




-- 
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: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [skywalking-swck] hanahmily merged pull request #50: add adapter e2e

Posted by GitBox <gi...@apache.org>.
hanahmily merged pull request #50:
URL: https://github.com/apache/skywalking-swck/pull/50


   


-- 
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: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [skywalking-swck] dashanji commented on a change in pull request #50: add adapter e2e

Posted by GitBox <gi...@apache.org>.
dashanji commented on a change in pull request #50:
URL: https://github.com/apache/skywalking-swck/pull/50#discussion_r756556126



##########
File path: test/e2e/demo.yaml
##########
@@ -39,6 +39,12 @@ spec:
         args: ["$(AGENT_OPTS)","-jar","/app.jar"]
         ports:
           - containerPort: 8085
+        readinessProbe:
+          httpGet:
+            path: /hello
+            port: 8085
+          initialDelaySeconds: 3
+          periodSeconds: 3

Review comment:
       get it.




-- 
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: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [skywalking-swck] hanahmily commented on a change in pull request #50: add adapter e2e

Posted by GitBox <gi...@apache.org>.
hanahmily commented on a change in pull request #50:
URL: https://github.com/apache/skywalking-swck/pull/50#discussion_r756535221



##########
File path: test/e2e/oap-agent-adapter-hpa/e2e.yaml
##########
@@ -0,0 +1,106 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+setup:
+  env: kind
+  file: ../kind.yaml
+  steps:
+    - name: prepare e2e.yaml
+      command: bash hack/prepare-e2e.sh
+    - name: install cert-manager
+      command: |
+        # kind k8s cluster is in $TMPDIR
+        export KUBECONFIG=$TMPDIR/e2e-k8s.config
+        kubectl apply -f https://github.com/jetstack/cert-manager/releases/download/v1.3.1/cert-manager.yaml
+      wait:
+        - namespace: cert-manager
+          resource: pod
+          for: condition=Ready
+    - name: install operator
+      command: |
+        export OPERATOR_IMG=controller
+        make operator-docker-build   
+        kind load docker-image controller
+        make operator-install
+        make operator-deploy
+      wait:
+        - namespace: skywalking-swck-system
+          resource: pod
+          for: condition=Ready
+    - name: wait webhook installing
+      command: |
+        bash hack/wait-webhook.sh
+    - name: install metrics-adapter
+      command: |
+        export ADAPTER_IMG=metrics-adapter
+        make adapter-docker-build  
+        make adapter-deploy
+      wait:
+        - namespace: skywalking-custom-metrics-system
+          resource: pod
+          for: condition=Ready
+    - name: setup oapserver and ui
+      command: |
+        kubectl create namespace skywalking-system
+        grep -B20 "\-\-\-" test/e2e/skywalking-components.yaml | kubectl apply -f -
+      wait:
+        - namespace: skywalking-system
+          resource: OAPServer/skywalking-system
+          for: condition=Available
+    - name: setup java agent demo
+      command: |
+        kubectl label namespace skywalking-system swck-injection=enabled
+        sed 's/oap-service/skywalking-system-oap.skywalking-system/' test/e2e/demo.yaml | kubectl create -f -
+      wait:
+        - namespace: skywalking-system
+          resource: deployment/demo
+          for: condition=Available
+    - name: setup the hpa of java agent demo
+      command: |
+        kubectl apply -f test/e2e/hpa-demo.yaml
+  kind:
+    expose-ports:
+      - namespace: skywalking-system
+        resource: service/demo 
+        port: 8085
+      - namespace: skywalking-system
+        resource: service/skywalking-system-oap
+        port: 12800
+  timeout: 20m
+
+cleanup:
+  # always never success failure
+  on: always
+
+trigger:
+  action: http
+  interval: 30s

Review comment:
       My question is that since the throughput is 2 cpm. Base on 
   
   ```
   desiredReplicas = ceil[currentReplicas * ( currentMetricValue / desiredMetricValue )]
   ```
   
   The desriedReplicas should be 1 * (2/5) = 1. The replica number doesn't have a chance to go to 3. Anything I missed here?
   
   

##########
File path: test/e2e/demo.yaml
##########
@@ -39,6 +39,12 @@ spec:
         args: ["$(AGENT_OPTS)","-jar","/app.jar"]
         ports:
           - containerPort: 8085
+        readinessProbe:
+          httpGet:
+            path: /hello
+            port: 8085
+          initialDelaySeconds: 3
+          periodSeconds: 3

Review comment:
       Could you add `failureThreshold: 10` to avoid some potential failures.




-- 
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: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [skywalking-swck] hanahmily commented on a change in pull request #50: add adapter e2e

Posted by GitBox <gi...@apache.org>.
hanahmily commented on a change in pull request #50:
URL: https://github.com/apache/skywalking-swck/pull/50#discussion_r756537986



##########
File path: test/e2e/oap-agent-adapter-hpa/e2e.yaml
##########
@@ -0,0 +1,106 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+setup:
+  env: kind
+  file: ../kind.yaml
+  steps:
+    - name: prepare e2e.yaml
+      command: bash hack/prepare-e2e.sh
+    - name: install cert-manager
+      command: |
+        # kind k8s cluster is in $TMPDIR
+        export KUBECONFIG=$TMPDIR/e2e-k8s.config
+        kubectl apply -f https://github.com/jetstack/cert-manager/releases/download/v1.3.1/cert-manager.yaml
+      wait:
+        - namespace: cert-manager
+          resource: pod
+          for: condition=Ready
+    - name: install operator
+      command: |
+        export OPERATOR_IMG=controller
+        make operator-docker-build   
+        kind load docker-image controller
+        make operator-install
+        make operator-deploy
+      wait:
+        - namespace: skywalking-swck-system
+          resource: pod
+          for: condition=Ready
+    - name: wait webhook installing
+      command: |
+        bash hack/wait-webhook.sh
+    - name: install metrics-adapter
+      command: |
+        export ADAPTER_IMG=metrics-adapter
+        make adapter-docker-build  
+        make adapter-deploy
+      wait:
+        - namespace: skywalking-custom-metrics-system
+          resource: pod
+          for: condition=Ready
+    - name: setup oapserver and ui
+      command: |
+        kubectl create namespace skywalking-system
+        grep -B20 "\-\-\-" test/e2e/skywalking-components.yaml | kubectl apply -f -
+      wait:
+        - namespace: skywalking-system
+          resource: OAPServer/skywalking-system
+          for: condition=Available
+    - name: setup java agent demo
+      command: |
+        kubectl label namespace skywalking-system swck-injection=enabled
+        sed 's/oap-service/skywalking-system-oap.skywalking-system/' test/e2e/demo.yaml | kubectl create -f -
+      wait:
+        - namespace: skywalking-system
+          resource: deployment/demo
+          for: condition=Available
+    - name: setup the hpa of java agent demo
+      command: |
+        kubectl apply -f test/e2e/hpa-demo.yaml
+  kind:
+    expose-ports:
+      - namespace: skywalking-system
+        resource: service/demo 
+        port: 8085
+      - namespace: skywalking-system
+        resource: service/skywalking-system-oap
+        port: 12800
+  timeout: 20m
+
+cleanup:
+  # always never success failure
+  on: always
+
+trigger:
+  action: http
+  interval: 30s

Review comment:
       I speculate that the current metric from oap might not 2. Could you verify it firstly?




-- 
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: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [skywalking-swck] dashanji commented on a change in pull request #50: add adapter e2e

Posted by GitBox <gi...@apache.org>.
dashanji commented on a change in pull request #50:
URL: https://github.com/apache/skywalking-swck/pull/50#discussion_r756557631



##########
File path: test/e2e/oap-agent-adapter-hpa/e2e.yaml
##########
@@ -0,0 +1,106 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+setup:
+  env: kind
+  file: ../kind.yaml
+  steps:
+    - name: prepare e2e.yaml
+      command: bash hack/prepare-e2e.sh
+    - name: install cert-manager
+      command: |
+        # kind k8s cluster is in $TMPDIR
+        export KUBECONFIG=$TMPDIR/e2e-k8s.config
+        kubectl apply -f https://github.com/jetstack/cert-manager/releases/download/v1.3.1/cert-manager.yaml
+      wait:
+        - namespace: cert-manager
+          resource: pod
+          for: condition=Ready
+    - name: install operator
+      command: |
+        export OPERATOR_IMG=controller
+        make operator-docker-build   
+        kind load docker-image controller
+        make operator-install
+        make operator-deploy
+      wait:
+        - namespace: skywalking-swck-system
+          resource: pod
+          for: condition=Ready
+    - name: wait webhook installing
+      command: |
+        bash hack/wait-webhook.sh
+    - name: install metrics-adapter
+      command: |
+        export ADAPTER_IMG=metrics-adapter
+        make adapter-docker-build  
+        make adapter-deploy
+      wait:
+        - namespace: skywalking-custom-metrics-system
+          resource: pod
+          for: condition=Ready
+    - name: setup oapserver and ui
+      command: |
+        kubectl create namespace skywalking-system
+        grep -B20 "\-\-\-" test/e2e/skywalking-components.yaml | kubectl apply -f -
+      wait:
+        - namespace: skywalking-system
+          resource: OAPServer/skywalking-system
+          for: condition=Available
+    - name: setup java agent demo
+      command: |
+        kubectl label namespace skywalking-system swck-injection=enabled
+        sed 's/oap-service/skywalking-system-oap.skywalking-system/' test/e2e/demo.yaml | kubectl create -f -
+      wait:
+        - namespace: skywalking-system
+          resource: deployment/demo
+          for: condition=Available
+    - name: setup the hpa of java agent demo
+      command: |
+        kubectl apply -f test/e2e/hpa-demo.yaml
+  kind:
+    expose-ports:
+      - namespace: skywalking-system
+        resource: service/demo 
+        port: 8085
+      - namespace: skywalking-system
+        resource: service/skywalking-system-oap
+        port: 12800
+  timeout: 20m
+
+cleanup:
+  # always never success failure
+  on: always
+
+trigger:
+  action: http
+  interval: 30s

Review comment:
       yep, I think the `trigger` part will do 30 times in a very short time, and the interval is between the `trigger` part and the `verify` part. I will add a case to show the cpm(15+), which makes it easier to understand.




-- 
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: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org