From 704e09d46ee4782471a5c446669dd172c0ce3e92 Mon Sep 17 00:00:00 2001
From: jiangpengcheng <scjiangpengcheng@gmail.com>
Date: Wed, 26 Jun 2024 15:42:29 +0800
Subject: [PATCH] Fix ci

---
 .ci/helm.sh                                    |  2 +-
 .ci/tests/integration-oauth2/e2e.yaml          |  2 +-
 .../e2e_with_downloader.yaml                   |  2 +-
 .ci/tests/integration/e2e.yaml                 |  2 +-
 .ci/tests/integration/e2e_with_tls.yaml        |  2 +-
 Makefile                                       |  2 +-
 api/compute/v1alpha1/zz_generated.deepcopy.go  |  1 -
 ...compute.functionmesh.io-functionmeshes.yaml |  2 +-
 .../crd-compute.functionmesh.io-functions.yaml |  2 +-
 .../crd-compute.functionmesh.io-sinks.yaml     |  2 +-
 .../crd-compute.functionmesh.io-sources.yaml   |  2 +-
 ...compute.functionmesh.io_functionmeshes.yaml |  3 +--
 .../compute.functionmesh.io_functions.yaml     |  3 +--
 .../bases/compute.functionmesh.io_sinks.yaml   |  3 +--
 .../bases/compute.functionmesh.io_sources.yaml |  3 +--
 config/rbac/role.yaml                          |  1 -
 config/webhook/manifests.yaml                  |  2 --
 controllers/spec/common.go                     | 18 ------------------
 18 files changed, 14 insertions(+), 40 deletions(-)

diff --git a/.ci/helm.sh b/.ci/helm.sh
index 042eaba47..931744862 100644
--- a/.ci/helm.sh
+++ b/.ci/helm.sh
@@ -85,7 +85,7 @@ function ci::install_pulsar_charts() {
     if [ -d "pulsar-charts" ]; then
         rm -rf pulsar-charts
     fi
-    git clone https://github.com/streamnative/charts.git pulsar-charts
+    git clone --branch pulsar-operator-0.17.10 https://github.com/streamnative/charts.git pulsar-charts
     cp ${values} pulsar-charts/charts/pulsar/mini_values.yaml
     cd pulsar-charts
     ./scripts/pulsar/prepare_helm_release.sh -n default -k sn-platform -c
diff --git a/.ci/tests/integration-oauth2/e2e.yaml b/.ci/tests/integration-oauth2/e2e.yaml
index 5f2877574..2fd0854ca 100644
--- a/.ci/tests/integration-oauth2/e2e.yaml
+++ b/.ci/tests/integration-oauth2/e2e.yaml
@@ -33,7 +33,7 @@ setup:
       command: |
         helm repo add streamnative https://charts.streamnative.io
         rm -rf pulsar-charts/
-        git clone https://github.com/streamnative/charts.git pulsar-charts
+        git clone --branch pulsar-operator-0.17.10 https://github.com/streamnative/charts.git pulsar-charts
         cd pulsar-charts/
         ./scripts/pulsar/prepare_helm_release.sh -n default -k ${PULSAR_RELEASE_NAME} -c
         helm repo add grafana https://grafana.github.io/helm-charts
diff --git a/.ci/tests/integration-oauth2/e2e_with_downloader.yaml b/.ci/tests/integration-oauth2/e2e_with_downloader.yaml
index a5b4a8cc4..975be3a88 100644
--- a/.ci/tests/integration-oauth2/e2e_with_downloader.yaml
+++ b/.ci/tests/integration-oauth2/e2e_with_downloader.yaml
@@ -33,7 +33,7 @@ setup:
       command: |
         helm repo add streamnative https://charts.streamnative.io
         rm -rf pulsar-charts/
-        git clone https://github.com/streamnative/charts.git pulsar-charts
+        git clone --branch pulsar-operator-0.17.10 https://github.com/streamnative/charts.git pulsar-charts
         cd pulsar-charts/
         ./scripts/pulsar/prepare_helm_release.sh -n default -k ${PULSAR_RELEASE_NAME} -c
         helm repo add grafana https://grafana.github.io/helm-charts
diff --git a/.ci/tests/integration/e2e.yaml b/.ci/tests/integration/e2e.yaml
index bf11a8df8..bdf6a518e 100644
--- a/.ci/tests/integration/e2e.yaml
+++ b/.ci/tests/integration/e2e.yaml
@@ -39,7 +39,7 @@ setup:
       command: |
         helm repo add streamnative https://charts.streamnative.io
         rm -rf pulsar-charts/
-        git clone https://github.com/streamnative/charts.git pulsar-charts
+        git clone --branch pulsar-operator-0.17.10 https://github.com/streamnative/charts.git pulsar-charts
         cd pulsar-charts/
         ./scripts/pulsar/prepare_helm_release.sh -n default -k ${PULSAR_RELEASE_NAME} -c
         helm repo add grafana https://grafana.github.io/helm-charts
diff --git a/.ci/tests/integration/e2e_with_tls.yaml b/.ci/tests/integration/e2e_with_tls.yaml
index 7cfb87460..0f2a36e59 100644
--- a/.ci/tests/integration/e2e_with_tls.yaml
+++ b/.ci/tests/integration/e2e_with_tls.yaml
@@ -28,7 +28,7 @@ setup:
       command: |
         helm repo add streamnative https://charts.streamnative.io
         rm -rf pulsar-charts/
-        git clone https://github.com/streamnative/charts.git pulsar-charts
+        git clone --branch pulsar-operator-0.17.10 https://github.com/streamnative/charts.git pulsar-charts
         cd pulsar-charts/
         ./scripts/pulsar/prepare_helm_release.sh -n default -k ${PULSAR_RELEASE_NAME} -c
         helm repo add grafana https://grafana.github.io/helm-charts
diff --git a/Makefile b/Makefile
index 7fc201ee0..d510bdd59 100644
--- a/Makefile
+++ b/Makefile
@@ -130,7 +130,7 @@ image-push:
 # find or download controller-gen
 # download controller-gen if necessary
 controller-gen:
-	$(call go-get-tool,$(CONTROLLER_GEN),sigs.k8s.io/controller-tools/cmd/controller-gen@v0.9.2)
+	$(call go-get-tool,$(CONTROLLER_GEN),sigs.k8s.io/controller-tools/cmd/controller-gen@v0.15.0)
 
 kustomize: ## Download kustomize locally if necessary.
 	$(call go-get-tool,$(KUSTOMIZE),sigs.k8s.io/kustomize/kustomize/v4@v4.5.5)
diff --git a/api/compute/v1alpha1/zz_generated.deepcopy.go b/api/compute/v1alpha1/zz_generated.deepcopy.go
index 054ae4ab6..00617fdeb 100644
--- a/api/compute/v1alpha1/zz_generated.deepcopy.go
+++ b/api/compute/v1alpha1/zz_generated.deepcopy.go
@@ -1,5 +1,4 @@
 //go:build !ignore_autogenerated
-// +build !ignore_autogenerated
 
 // Licensed to the Apache Software Foundation (ASF) under one
 // or more contributor license agreements.  See the NOTICE file
diff --git a/charts/function-mesh-operator/charts/admission-webhook/templates/crd-compute.functionmesh.io-functionmeshes.yaml b/charts/function-mesh-operator/charts/admission-webhook/templates/crd-compute.functionmesh.io-functionmeshes.yaml
index 82a51281d..53d520b0e 100644
--- a/charts/function-mesh-operator/charts/admission-webhook/templates/crd-compute.functionmesh.io-functionmeshes.yaml
+++ b/charts/function-mesh-operator/charts/admission-webhook/templates/crd-compute.functionmesh.io-functionmeshes.yaml
@@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
 kind: CustomResourceDefinition
 metadata:
   annotations:
-    controller-gen.kubebuilder.io/version: v0.9.2
+    controller-gen.kubebuilder.io/version: v0.15.0
   name: functionmeshes.compute.functionmesh.io
 spec:
   group: compute.functionmesh.io
diff --git a/charts/function-mesh-operator/charts/admission-webhook/templates/crd-compute.functionmesh.io-functions.yaml b/charts/function-mesh-operator/charts/admission-webhook/templates/crd-compute.functionmesh.io-functions.yaml
index ad1874b0e..ceef3a926 100644
--- a/charts/function-mesh-operator/charts/admission-webhook/templates/crd-compute.functionmesh.io-functions.yaml
+++ b/charts/function-mesh-operator/charts/admission-webhook/templates/crd-compute.functionmesh.io-functions.yaml
@@ -6,7 +6,7 @@ metadata:
     {{- if eq .Values.admissionWebhook.certificate.provider "cert-manager" }}
       {{- include "function-mesh-operator.certManager.annotation" . | nindent 4 -}}
     {{- end }}
-    controller-gen.kubebuilder.io/version: v0.9.2
+    controller-gen.kubebuilder.io/version: v0.15.0
   name: functions.compute.functionmesh.io
 spec:
   conversion:
diff --git a/charts/function-mesh-operator/charts/admission-webhook/templates/crd-compute.functionmesh.io-sinks.yaml b/charts/function-mesh-operator/charts/admission-webhook/templates/crd-compute.functionmesh.io-sinks.yaml
index a3fb9ab2f..def73527f 100644
--- a/charts/function-mesh-operator/charts/admission-webhook/templates/crd-compute.functionmesh.io-sinks.yaml
+++ b/charts/function-mesh-operator/charts/admission-webhook/templates/crd-compute.functionmesh.io-sinks.yaml
@@ -6,7 +6,7 @@ metadata:
     {{- if eq .Values.admissionWebhook.certificate.provider "cert-manager" }}
       {{- include "function-mesh-operator.certManager.annotation" . | nindent 4 -}}
     {{- end }}
-    controller-gen.kubebuilder.io/version: v0.9.2
+    controller-gen.kubebuilder.io/version: v0.15.0
   name: sinks.compute.functionmesh.io
 spec:
   conversion:
diff --git a/charts/function-mesh-operator/charts/admission-webhook/templates/crd-compute.functionmesh.io-sources.yaml b/charts/function-mesh-operator/charts/admission-webhook/templates/crd-compute.functionmesh.io-sources.yaml
index 076359d84..2a1607a35 100644
--- a/charts/function-mesh-operator/charts/admission-webhook/templates/crd-compute.functionmesh.io-sources.yaml
+++ b/charts/function-mesh-operator/charts/admission-webhook/templates/crd-compute.functionmesh.io-sources.yaml
@@ -6,7 +6,7 @@ metadata:
     {{- if eq .Values.admissionWebhook.certificate.provider "cert-manager" }}
       {{- include "function-mesh-operator.certManager.annotation" . | nindent 4 -}}
     {{- end }}
-    controller-gen.kubebuilder.io/version: v0.9.2
+    controller-gen.kubebuilder.io/version: v0.15.0
   name: sources.compute.functionmesh.io
 spec:
   conversion:
diff --git a/config/crd/bases/compute.functionmesh.io_functionmeshes.yaml b/config/crd/bases/compute.functionmesh.io_functionmeshes.yaml
index 4c0b466ad..b17779935 100644
--- a/config/crd/bases/compute.functionmesh.io_functionmeshes.yaml
+++ b/config/crd/bases/compute.functionmesh.io_functionmeshes.yaml
@@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
 kind: CustomResourceDefinition
 metadata:
   annotations:
-    controller-gen.kubebuilder.io/version: v0.9.2
-  creationTimestamp: null
+    controller-gen.kubebuilder.io/version: v0.15.0
   name: functionmeshes.compute.functionmesh.io
 spec:
   group: compute.functionmesh.io
diff --git a/config/crd/bases/compute.functionmesh.io_functions.yaml b/config/crd/bases/compute.functionmesh.io_functions.yaml
index 1fd92fc00..75d4adf0e 100644
--- a/config/crd/bases/compute.functionmesh.io_functions.yaml
+++ b/config/crd/bases/compute.functionmesh.io_functions.yaml
@@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
 kind: CustomResourceDefinition
 metadata:
   annotations:
-    controller-gen.kubebuilder.io/version: v0.9.2
-  creationTimestamp: null
+    controller-gen.kubebuilder.io/version: v0.15.0
   name: functions.compute.functionmesh.io
 spec:
   group: compute.functionmesh.io
diff --git a/config/crd/bases/compute.functionmesh.io_sinks.yaml b/config/crd/bases/compute.functionmesh.io_sinks.yaml
index c54b582b6..12ec4893b 100644
--- a/config/crd/bases/compute.functionmesh.io_sinks.yaml
+++ b/config/crd/bases/compute.functionmesh.io_sinks.yaml
@@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
 kind: CustomResourceDefinition
 metadata:
   annotations:
-    controller-gen.kubebuilder.io/version: v0.9.2
-  creationTimestamp: null
+    controller-gen.kubebuilder.io/version: v0.15.0
   name: sinks.compute.functionmesh.io
 spec:
   group: compute.functionmesh.io
diff --git a/config/crd/bases/compute.functionmesh.io_sources.yaml b/config/crd/bases/compute.functionmesh.io_sources.yaml
index 57d8fe42e..0fc790014 100644
--- a/config/crd/bases/compute.functionmesh.io_sources.yaml
+++ b/config/crd/bases/compute.functionmesh.io_sources.yaml
@@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
 kind: CustomResourceDefinition
 metadata:
   annotations:
-    controller-gen.kubebuilder.io/version: v0.9.2
-  creationTimestamp: null
+    controller-gen.kubebuilder.io/version: v0.15.0
   name: sources.compute.functionmesh.io
 spec:
   group: compute.functionmesh.io
diff --git a/config/rbac/role.yaml b/config/rbac/role.yaml
index d35761a72..b727e966a 100644
--- a/config/rbac/role.yaml
+++ b/config/rbac/role.yaml
@@ -2,7 +2,6 @@
 apiVersion: rbac.authorization.k8s.io/v1
 kind: ClusterRole
 metadata:
-  creationTimestamp: null
   name: manager-role
 rules:
 - apiGroups:
diff --git a/config/webhook/manifests.yaml b/config/webhook/manifests.yaml
index 79400e6d4..47cbd5b2d 100644
--- a/config/webhook/manifests.yaml
+++ b/config/webhook/manifests.yaml
@@ -2,7 +2,6 @@
 apiVersion: admissionregistration.k8s.io/v1
 kind: MutatingWebhookConfiguration
 metadata:
-  creationTimestamp: null
   name: mutating-webhook-configuration
 webhooks:
 - admissionReviewVersions:
@@ -72,7 +71,6 @@ webhooks:
 apiVersion: admissionregistration.k8s.io/v1
 kind: ValidatingWebhookConfiguration
 metadata:
-  creationTimestamp: null
   name: validating-webhook-configuration
 webhooks:
 - admissionReviewVersions:
diff --git a/controllers/spec/common.go b/controllers/spec/common.go
index abc72c654..5168fa4eb 100644
--- a/controllers/spec/common.go
+++ b/controllers/spec/common.go
@@ -1852,24 +1852,6 @@ func getPythonSecretProviderArgs(secretMaps map[string]v1alpha1.SecretRef) []str
 	return ret
 }
 
-func getGenericSecretProviderArgs(secretMaps map[string]v1alpha1.SecretRef, language string) []string {
-	var ret []string
-	if len(secretMaps) > 0 {
-		if language == "python" {
-			ret = []string{
-				"--secrets_provider",
-				"secrets_provider.EnvironmentBasedSecretsProvider",
-			}
-		} else if language == "nodejs" {
-			ret = []string{
-				"--secrets_provider",
-				"EnvironmentBasedSecretsProvider",
-			}
-		}
-	}
-	return ret
-}
-
 func getTLSTrustCertPath(tlsVolume TLSConfig, path string) string {
 	return fmt.Sprintf("%s/%s", tlsVolume.GetMountPath(), path)
 }