This is an automated email from the ASF dual-hosted git repository. kezhenxu94 pushed a commit to branch helm in repository https://gitbox.apache.org/repos/asf/skywalking-showcase.git
commit e2c85c6aaa7a404987c33af7f6741cf5639da898 Author: kezhenxu94 <[email protected]> AuthorDate: Thu Dec 15 11:57:02 2022 +0000 Polish some scripts to fix deployment failure --- deploy/platform/kubernetes/features.mk | 10 +++--- scripts/wait-cert-manager-ready.sh | 59 ---------------------------------- 2 files changed, 4 insertions(+), 65 deletions(-) diff --git a/deploy/platform/kubernetes/features.mk b/deploy/platform/kubernetes/features.mk index 65494b1..9000a82 100644 --- a/deploy/platform/kubernetes/features.mk +++ b/deploy/platform/kubernetes/features.mk @@ -107,13 +107,12 @@ feature-java-agent-injector: # @feature: java-agent-injector; the swck operator depends on the certificate management of the cert-manager .PHONY: install-cert-manager install-cert-manager: - @kubectl apply -f https://github.com/jetstack/cert-manager/releases/download/${CERT_MANAGER_VERSION}/cert-manager.yaml - @sh ../../../scripts/wait-cert-manager-ready.sh + @kubectl apply -f https://github.com/jetstack/cert-manager/releases/download/${CERT_MANAGER_VERSION}/cert-manager.yaml --wait # @feature: java-agent-injector; the java agent injector is a component of the swck operator, so we need to deploy the swck operator firstly .PHONY: deploy.feature-java-agent-injector deploy.feature-java-agent-injector: install-cert-manager - @curl -Ls https://archive.apache.org/dist/skywalking/swck/${SWCK_OPERATOR_VERSION}/skywalking-swck-${SWCK_OPERATOR_VERSION}-bin.tgz | tar -zxf - -O ./config/operator-bundle.yaml | kubectl apply -f - + @curl -L https://archive.apache.org/dist/skywalking/swck/${SWCK_OPERATOR_VERSION}/skywalking-swck-${SWCK_OPERATOR_VERSION}-bin.tgz | tar -zxf - -O ./config/operator-bundle.yaml | kubectl apply -f - @kubectl label namespace --overwrite $(NAMESPACE) swck-injection=enabled # @feature: java-agent-injector; we can update the agent's backend address in a single-node cluster firstly so that we don't need to add the same backend env for every java agent @kubectl get configmap skywalking-swck-java-agent-configmap -n skywalking-swck-system -oyaml | sed "s/127.0.0.1/$(NAMESPACE)-$(BACKEND_SERVICE).$(NAMESPACE)/" | kubectl apply -f - @@ -141,8 +140,7 @@ open-function: helm --set global.Dapr.enabled=false \ --set contour.envoy.useHostPort=false \ --set contour.envoy.service.type=ClusterIP \ - --set contour.envoy.service.externalTrafficPolicy="" \ - --wait + --set contour.envoy.service.externalTrafficPolicy="" # @feature: function; install open function resources .PHONY: deploy.feature-function @@ -154,4 +152,4 @@ feature-function: .PHONY: undeploy.feature-function undeploy.feature-function: helm - @helm uninstall openfunction -n openfunction + @helm uninstall openfunction -n openfunction --timeout 20m diff --git a/scripts/wait-cert-manager-ready.sh b/scripts/wait-cert-manager-ready.sh deleted file mode 100644 index 2067170..0000000 --- a/scripts/wait-cert-manager-ready.sh +++ /dev/null @@ -1,59 +0,0 @@ -#!/bin/bash - -# 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. -# - -TIMEOUT=120 - -MANIFEST=$(mktemp) - -cat << EOF > $MANIFEST -apiVersion: cert-manager.io/v1 -kind: Issuer -metadata: - name: test-selfsigned - namespace: default -spec: - selfSigned: {} ---- -apiVersion: cert-manager.io/v1 -kind: Certificate -metadata: - name: selfsigned-cert - namespace: default -spec: - dnsNames: - - example.com - secretName: selfsigned-cert-tls - issuerRef: - name: test-selfsigned -EOF - -( bash -c -- "\ - while ! kubectl apply -f $MANIFEST 2> /dev/null; \ - do \ - sleep 0.1; \ - done" ) & pid=$! -( sleep $TIMEOUT && pkill -HUP $pid ) 2>/dev/null & watcher=$! -if wait $pid 2>/dev/null; then - pkill -HUP -P $watcher - wait $watcher -fi - -# make sure the dummy Issuer and Certificate will be deleted -trap "kubectl delete -f $MANIFEST; rm $MANIFEST" 0 2 3 15
