From 927bc5604be7a01fb6e5e5aebfb74241ed35f71c Mon Sep 17 00:00:00 2001 From: Zhiying Lin Date: Fri, 22 Nov 2024 18:33:50 +0800 Subject: [PATCH 1/3] fix: fix the tutorials --- charts/hub-agent/templates/deployment.yaml | 2 ++ charts/hub-agent/values.yaml | 4 ++-- docs/getting-started/kind.md | 1 + hack/membership/join.sh | 6 +++++- 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/charts/hub-agent/templates/deployment.yaml b/charts/hub-agent/templates/deployment.yaml index 1a7a98037..2884e1c37 100644 --- a/charts/hub-agent/templates/deployment.yaml +++ b/charts/hub-agent/templates/deployment.yaml @@ -30,7 +30,9 @@ spec: - -add_dir_header - --enable-v1alpha1-apis={{ .Values.enableV1Alpha1APIs }} - --enable-v1beta1-apis={{ .Values.enableV1Beta1APIs }} + {{- if .Values.enableClusterInventoryAPI }} - --enable-cluster-inventory-apis={{ .Values.enableClusterInventoryAPI }} + {{- end }} - --max-concurrent-cluster-placement={{ .Values.MaxConcurrentClusterPlacement }} - --concurrent-resource-change-syncs={{ .Values.ConcurrentResourceChangeSyncs }} - --log_file_max_size={{ .Values.logFileMaxSize }} diff --git a/charts/hub-agent/values.yaml b/charts/hub-agent/values.yaml index 7a3394fe4..2a9463663 100644 --- a/charts/hub-agent/values.yaml +++ b/charts/hub-agent/values.yaml @@ -35,11 +35,11 @@ affinity: {} enableV1Alpha1APIs: false enableV1Beta1APIs: true -enableClusterInventoryAPI: true +enableClusterInventoryAPI: false hubAPIQPS: 250 hubAPIBurst: 1000 MaxConcurrentClusterPlacement: 100 ConcurrentResourceChangeSyncs: 20 -logFileMaxSize: 10000000 +logFileMaxSize: "10000000" MaxFleetSizeSupported: 100 diff --git a/docs/getting-started/kind.md b/docs/getting-started/kind.md index 4a1ba6e55..8c368797d 100644 --- a/docs/getting-started/kind.md +++ b/docs/getting-started/kind.md @@ -75,6 +75,7 @@ kubectl config use-context $HUB_CLUSTER_CONTEXT # The variables below uses the Fleet images kept in the Microsoft Container Registry (MCR), # and will retrieve the latest version from the Fleet GitHub repository. +# Note: The pre-release version image may not exist in the MCR and is not recommended. # # You can, however, build the Fleet images of your own; see the repository README for # more information. diff --git a/hack/membership/join.sh b/hack/membership/join.sh index 072135d51..bfa4e2e5a 100755 --- a/hack/membership/join.sh +++ b/hack/membership/join.sh @@ -115,7 +115,11 @@ echo "Installing the member agent..." kubectl config use-context $MEMBER_CLUSTER_CONTEXT kubectl delete secret hub-kubeconfig-secret --ignore-not-found --wait kubectl create secret generic hub-kubeconfig-secret --from-literal=token=$TOKEN -helm uninstall member-agent --ignore-not-found --wait +if helm list -q | grep -q "^member-agent$"; then + helm uninstall member-agent --wait +else + echo "Release 'member-agent' not found. Skipping uninstallation." +fi helm install member-agent charts/member-agent/ \ --set config.hubURL=$HUB_CLUSTER_ADDRESS \ --set image.repository=$REGISTRY/$MEMBER_AGENT_IMAGE \ From 46c7a6cebce4ad5d7a17ab5913526924e849ffaf Mon Sep 17 00:00:00 2001 From: Zhiying Lin Date: Tue, 26 Nov 2024 13:23:29 +0800 Subject: [PATCH 2/3] address comments --- hack/membership/join.sh | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/hack/membership/join.sh b/hack/membership/join.sh index bfa4e2e5a..072135d51 100755 --- a/hack/membership/join.sh +++ b/hack/membership/join.sh @@ -115,11 +115,7 @@ echo "Installing the member agent..." kubectl config use-context $MEMBER_CLUSTER_CONTEXT kubectl delete secret hub-kubeconfig-secret --ignore-not-found --wait kubectl create secret generic hub-kubeconfig-secret --from-literal=token=$TOKEN -if helm list -q | grep -q "^member-agent$"; then - helm uninstall member-agent --wait -else - echo "Release 'member-agent' not found. Skipping uninstallation." -fi +helm uninstall member-agent --ignore-not-found --wait helm install member-agent charts/member-agent/ \ --set config.hubURL=$HUB_CLUSTER_ADDRESS \ --set image.repository=$REGISTRY/$MEMBER_AGENT_IMAGE \ From e8ce2662fa02d4ff7c6ad2e04333db343afae6fd Mon Sep 17 00:00:00 2001 From: Zhiying Lin Date: Mon, 9 Dec 2024 17:59:58 +0800 Subject: [PATCH 3/3] address comments --- charts/hub-agent/templates/deployment.yaml | 2 -- charts/hub-agent/values.yaml | 2 +- docs/getting-started/kind.md | 1 - 3 files changed, 1 insertion(+), 4 deletions(-) diff --git a/charts/hub-agent/templates/deployment.yaml b/charts/hub-agent/templates/deployment.yaml index 2884e1c37..1a7a98037 100644 --- a/charts/hub-agent/templates/deployment.yaml +++ b/charts/hub-agent/templates/deployment.yaml @@ -30,9 +30,7 @@ spec: - -add_dir_header - --enable-v1alpha1-apis={{ .Values.enableV1Alpha1APIs }} - --enable-v1beta1-apis={{ .Values.enableV1Beta1APIs }} - {{- if .Values.enableClusterInventoryAPI }} - --enable-cluster-inventory-apis={{ .Values.enableClusterInventoryAPI }} - {{- end }} - --max-concurrent-cluster-placement={{ .Values.MaxConcurrentClusterPlacement }} - --concurrent-resource-change-syncs={{ .Values.ConcurrentResourceChangeSyncs }} - --log_file_max_size={{ .Values.logFileMaxSize }} diff --git a/charts/hub-agent/values.yaml b/charts/hub-agent/values.yaml index 2a9463663..8efe14714 100644 --- a/charts/hub-agent/values.yaml +++ b/charts/hub-agent/values.yaml @@ -35,7 +35,7 @@ affinity: {} enableV1Alpha1APIs: false enableV1Beta1APIs: true -enableClusterInventoryAPI: false +enableClusterInventoryAPI: true hubAPIQPS: 250 hubAPIBurst: 1000 diff --git a/docs/getting-started/kind.md b/docs/getting-started/kind.md index 8c368797d..4a1ba6e55 100644 --- a/docs/getting-started/kind.md +++ b/docs/getting-started/kind.md @@ -75,7 +75,6 @@ kubectl config use-context $HUB_CLUSTER_CONTEXT # The variables below uses the Fleet images kept in the Microsoft Container Registry (MCR), # and will retrieve the latest version from the Fleet GitHub repository. -# Note: The pre-release version image may not exist in the MCR and is not recommended. # # You can, however, build the Fleet images of your own; see the repository README for # more information.