This is an automated email from the ASF dual-hosted git repository.
albumenj pushed a commit to branch refactor-with-go
in repository https://gitbox.apache.org/repos/asf/dubbo-admin.git
The following commit(s) were added to refs/heads/refactor-with-go by this push:
new 45038c66 update charts (#1080)
45038c66 is described below
commit 45038c6607dc8295ead7825ecce5cb0445f11615
Author: Mford Jody <[email protected]>
AuthorDate: Wed Apr 12 20:25:56 2023 +0800
update charts (#1080)
update charts
---
deploy/charts/dubbo-admin/templates/_charts.tpl | 4 +-
.../charts/dubbo-admin/templates/clusterrole.yaml | 2 +
.../dubbo-admin/templates/clusterrolebinding.yaml | 2 +
.../charts/dubbo-admin/templates/deployment.yaml | 5 +-
deploy/charts/dubbo-admin/templates/role.yaml | 4 +-
.../charts/dubbo-admin/templates/rolebinding.yaml | 2 +
.../dubbo-admin/templates/serviceaccount.yaml | 4 +-
.../dubbo-admin/templates/tests/test-role.yaml | 36 -----------
.../templates/tests/test-rolebinding.yaml | 35 -----------
.../dubbo-admin/templates/tests/test-secret.yaml | 28 ---------
.../templates/tests/test-serviceaccount.yaml | 27 ---------
.../charts/dubbo-admin/templates/tests/test.yaml | 64 --------------------
deploy/kubernetes/dubbo-admin.yaml | 70 +---------------------
13 files changed, 20 insertions(+), 263 deletions(-)
diff --git a/deploy/charts/dubbo-admin/templates/_charts.tpl
b/deploy/charts/dubbo-admin/templates/_charts.tpl
index 4d020687..a6388976 100644
--- a/deploy/charts/dubbo-admin/templates/_charts.tpl
+++ b/deploy/charts/dubbo-admin/templates/_charts.tpl
@@ -145,9 +145,9 @@ Return the appropriate apiVersion for podDisruptionBudget.
*/}}
{{- define "dubbo-admin.podDisruptionBudget.apiVersion" -}}
{{- if $.Capabilities.APIVersions.Has "policy/v1/PodDisruptionBudget" }}
-{{- print "policy/v1" }}
-{{- else }}
{{- print "policy/v1beta1" }}
+{{- else }}
+{{- print "policy/v1" }}
{{- end }}
{{- end }}
diff --git a/deploy/charts/dubbo-admin/templates/clusterrole.yaml
b/deploy/charts/dubbo-admin/templates/clusterrole.yaml
index 007db0c8..ff004f2a 100644
--- a/deploy/charts/dubbo-admin/templates/clusterrole.yaml
+++ b/deploy/charts/dubbo-admin/templates/clusterrole.yaml
@@ -21,6 +21,8 @@ metadata:
{{- include "dubbo-admin.labels" . | nindent 4 }}
{{- with .Values.annotations }}
annotations:
+ "helm.sh/hook": test-success
+ "helm.sh/hook-delete-policy": "before-hook-creation,hook-succeeded"
{{- toYaml . | nindent 4 }}
{{- end }}
name: {{ include "dubbo-admin.fullname" . }}-clusterrole
diff --git a/deploy/charts/dubbo-admin/templates/clusterrolebinding.yaml
b/deploy/charts/dubbo-admin/templates/clusterrolebinding.yaml
index f3bbd2b5..87ff160d 100644
--- a/deploy/charts/dubbo-admin/templates/clusterrolebinding.yaml
+++ b/deploy/charts/dubbo-admin/templates/clusterrolebinding.yaml
@@ -22,6 +22,8 @@ metadata:
{{- include "dubbo-admin.labels" . | nindent 4 }}
{{- with .Values.annotations }}
annotations:
+ "helm.sh/hook": test-success
+ "helm.sh/hook-delete-policy": "before-hook-creation,hook-succeeded"
{{- toYaml . | nindent 4 }}
{{- end }}
subjects:
diff --git a/deploy/charts/dubbo-admin/templates/deployment.yaml
b/deploy/charts/dubbo-admin/templates/deployment.yaml
index b7b412f7..034f5d39 100644
--- a/deploy/charts/dubbo-admin/templates/deployment.yaml
+++ b/deploy/charts/dubbo-admin/templates/deployment.yaml
@@ -24,7 +24,10 @@ metadata:
{{- toYaml . | nindent 4 }}
{{- end }}
{{- with .Values.annotations }}
- annotations:
+ annotations:
+ "helm.sh/hook": post-install,post-upgrade,post-rollback
+ "helm.sh/weight": "0"
+ "helm.sh/hook-delete-policy": "before-hook-creation,hook-succeeded"
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
diff --git a/deploy/charts/dubbo-admin/templates/role.yaml
b/deploy/charts/dubbo-admin/templates/role.yaml
index 3e6fc506..16197fd7 100644
--- a/deploy/charts/dubbo-admin/templates/role.yaml
+++ b/deploy/charts/dubbo-admin/templates/role.yaml
@@ -13,7 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-{{- if and .Values.rbac.enabled -}}
+{{- if and .Values.rbac.enabled }}
apiVersion: {{ include "dubbo-admin.rbac.apiVersion" . }}
kind: Role
metadata:
@@ -26,6 +26,8 @@ metadata:
{{- end }}
{{- with .Values.annotations }}
annotations:
+ "helm.sh/hook": test-success
+ "helm.sh/hook-delete-policy": "before-hook-creation,hook-succeeded"
{{- toYaml . | nindent 4 }}
{{- end }}
{{- if .Values.rbac.pspEnabled }}
diff --git a/deploy/charts/dubbo-admin/templates/rolebinding.yaml
b/deploy/charts/dubbo-admin/templates/rolebinding.yaml
index f0898385..891e937a 100644
--- a/deploy/charts/dubbo-admin/templates/rolebinding.yaml
+++ b/deploy/charts/dubbo-admin/templates/rolebinding.yaml
@@ -26,6 +26,8 @@ metadata:
{{- end }}
{{- with .Values.annotations }}
annotations:
+ "helm.sh/hook": test-success
+ "helm.sh/hook-delete-policy": "before-hook-creation,hook-succeeded"
{{- toYaml . | nindent 4 }}
{{- end }}
roleRef:
diff --git a/deploy/charts/dubbo-admin/templates/serviceaccount.yaml
b/deploy/charts/dubbo-admin/templates/serviceaccount.yaml
index 9a2380ec..1ee3f402 100644
--- a/deploy/charts/dubbo-admin/templates/serviceaccount.yaml
+++ b/deploy/charts/dubbo-admin/templates/serviceaccount.yaml
@@ -14,7 +14,7 @@
# limitations under the License.
{{- if .Values.serviceAccount.enabled }}
-{{- $admin := . -}}
+{{- $admin := . }}
apiVersion: v1
kind: ServiceAccount
metadata:
@@ -25,6 +25,8 @@ metadata:
{{- end }}
{{- with .Values.serviceAccount.annotations }}
annotations:
+ "helm.sh/hook": test-success
+ "helm.sh/hook-delete-policy": "before-hook-creation,hook-succeeded"
{{- tpl (toYaml . | nindent 4) $admin }}
{{- end }}
name: {{ include "dubbo-admin.serviceAccountName" . }}
diff --git a/deploy/charts/dubbo-admin/templates/tests/test-role.yaml
b/deploy/charts/dubbo-admin/templates/tests/test-role.yaml
deleted file mode 100644
index 7051d9e4..00000000
--- a/deploy/charts/dubbo-admin/templates/tests/test-role.yaml
+++ /dev/null
@@ -1,36 +0,0 @@
-# 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.
-
-{{- if and (.Capabilities.APIVersions.Has "policy/v1beta1/PodSecurityPolicy")
.Values.tests.enabled .Values.rbac.pspEnabled }}
-apiVersion: rbac.authorization.k8s.io/v1
-kind: Role
-metadata:
- name: {{ include "dubbo-admin.fullname" . }}-test
- namespace: {{ include "dubbo-admin.namespace" . }}
- annotations:
- "helm.sh/hook": test-success
- "helm.sh/hook-delete-policy": "before-hook-creation,hook-succeeded"
- labels:
- {{- include "dubbo-admin.labels" . | nindent 4 }}
-rules:
- - apiGroups:
- - extensions
- resources:
- - podsecuritypolicies
- verbs:
- - use
- resourceNames:
- - {{ include "dubbo-admin.fullname" . }}-test
-{{- end }}
diff --git a/deploy/charts/dubbo-admin/templates/tests/test-rolebinding.yaml
b/deploy/charts/dubbo-admin/templates/tests/test-rolebinding.yaml
deleted file mode 100644
index e27854fe..00000000
--- a/deploy/charts/dubbo-admin/templates/tests/test-rolebinding.yaml
+++ /dev/null
@@ -1,35 +0,0 @@
-# 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.
-
-{{- if and (.Capabilities.APIVersions.Has "policy/v1beta1/PodSecurityPolicy")
.Values.tests.enabled .Values.rbac.pspEnabled }}
-apiVersion: rbac.authorization.k8s.io/v1
-kind: RoleBinding
-metadata:
- name: {{ include "dubbo-admin.fullname" . }}-test
- namespace: {{ include "dubbo-admin.namespace" . }}
- annotations:
- "helm.sh/hook": test-success
- "helm.sh/hook-delete-policy": "before-hook-creation,hook-succeeded"
- labels:
- {{- include "dubbo-admin.labels" . | nindent 4 }}
-roleRef:
- apiGroup: rbac.authorization.k8s.io
- kind: Role
- name: {{ include "dubbo-admin.fullname" . }}-test
-subjects:
- - kind: ServiceAccount
- name: {{ include "dubbo-admin.serviceAccountNameTest" . }}
- namespace: {{ include "dubbo-admin.namespace" . }}
-{{- end }}
diff --git a/deploy/charts/dubbo-admin/templates/tests/test-secret.yaml
b/deploy/charts/dubbo-admin/templates/tests/test-secret.yaml
deleted file mode 100644
index c10b26ee..00000000
--- a/deploy/charts/dubbo-admin/templates/tests/test-secret.yaml
+++ /dev/null
@@ -1,28 +0,0 @@
-# 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.
-
-apiVersion: v1
-kind: Secret
-metadata:
- name: {{ include "dubbo-admin.fullname" . }}-secret-test
- namespace: {{ include "dubbo-admin.namespace" . }}
- annotations:
- "helm.sh/hook": test-success
- "helm.sh/hook-delete-policy": "before-hook-creation,hook-succeeded"
- labels:
- {{- include "dubbo-admin.labels" . | nindent 4 }}
-type: Opaque
-data:
- application.properties: {{ tpl (toYaml .Values.properties) . | b64enc }}-test
diff --git a/deploy/charts/dubbo-admin/templates/tests/test-serviceaccount.yaml
b/deploy/charts/dubbo-admin/templates/tests/test-serviceaccount.yaml
deleted file mode 100644
index ab6b3c44..00000000
--- a/deploy/charts/dubbo-admin/templates/tests/test-serviceaccount.yaml
+++ /dev/null
@@ -1,27 +0,0 @@
-# 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.
-
-{{- if and .Values.tests.enabled .Values.serviceAccount.enabled }}
-apiVersion: v1
-kind: ServiceAccount
-metadata:
- labels:
- {{- include "dubbo-admin.labels" . | nindent 4 }}
- name: {{ include "dubbo-admin.serviceAccountNameTest" . }}
- namespace: {{ include "dubbo-admin.namespace" . }}
- annotations:
- "helm.sh/hook": test-success
- "helm.sh/hook-delete-policy": "before-hook-creation,hook-succeeded"
-{{- end }}
diff --git a/deploy/charts/dubbo-admin/templates/tests/test.yaml
b/deploy/charts/dubbo-admin/templates/tests/test.yaml
deleted file mode 100644
index cf049e24..00000000
--- a/deploy/charts/dubbo-admin/templates/tests/test.yaml
+++ /dev/null
@@ -1,64 +0,0 @@
-# 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.
-
-{{- if .Values.tests.enabled }}
-{{- $root := . }}
-apiVersion: v1
-kind: Pod
-metadata:
- name: {{ include "dubbo-admin.fullname" . }}-test
- labels:
- {{- include "dubbo-admin.labels" . | nindent 4 }}
- annotations:
- "helm.sh/hook": test-success
- "helm.sh/hook-delete-policy": "before-hook-creation,hook-succeeded"
- namespace: {{ include "dubbo-admin.namespace" . }}
-spec:
- serviceAccountName: {{ include "dubbo-admin.serviceAccountName" . }}
- {{- with .Values.tests.securityContext }}
- securityContext:
- {{- toYaml . | nindent 4 }}
- {{- end }}
- {{- if or .Values.image.pullSecrets .Values.global.imagePullSecrets }}
- imagePullSecrets:
- {{- include "dubbo-admin.imagePullSecrets" (dict "root" $root
"imagePullSecrets" .Values.image.pullSecrets) | nindent 4 }}
- {{- end }}
- {{- with .Values.nodeSelector }}
- nodeSelector:
- {{- toYaml . | nindent 4 }}
- {{- end }}
- {{- with .Values.affinity }}
- affinity:
- {{- tpl (toYaml .) $root | nindent 4 }}
- {{- end }}
- {{- with .Values.tolerations }}
- tolerations:
- {{- toYaml . | nindent 4 }}
- {{- end }}
- containers:
- - name: {{ .Release.Name }}-test
- image: "{{ .Values.tests.image}}"
- imagePullPolicy: "{{ .Values.tests.imagePullPolicy}}"
- command: ["wget"]
- volumeMounts:
- - mountPath: /tests
- name: tests
- readOnly: true
- volumes:
- - name: tests
- secret:
- secretName: {{ include "dubbo-admin.fullname" . }}-secret
- restartPolicy: Never
-{{- end }}
diff --git a/deploy/kubernetes/dubbo-admin.yaml
b/deploy/kubernetes/dubbo-admin.yaml
index ee938647..b1d9ba20 100644
--- a/deploy/kubernetes/dubbo-admin.yaml
+++ b/deploy/kubernetes/dubbo-admin.yaml
@@ -46,7 +46,7 @@ spec:
# 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.apiVersion: v1
+# limitations under the License.
apiVersion: v1
kind: ServiceAccount
metadata:
@@ -155,7 +155,6 @@ rules:
# 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.
-
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
@@ -188,8 +187,7 @@ roleRef:
# 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.apiVersion: rbac.authorization.k8s.io/v1
-
+# limitations under the License.
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
@@ -225,7 +223,6 @@ rules:
# 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.
-
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
@@ -260,7 +257,6 @@ subjects:
# 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.
-
apiVersion: v1
kind: Service
metadata:
@@ -298,7 +294,6 @@ spec:
# 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.
-
apiVersion: v1
kind: Service
metadata:
@@ -476,64 +471,3 @@ spec:
# 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.
----
-# Source: dubbo-admin/templates/tests/test-role.yaml
-# 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.
----
-# Source: dubbo-admin/templates/tests/test-rolebinding.yaml
-# 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.
----
-# Source: dubbo-admin/templates/tests/test-serviceaccount.yaml
-# 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.
-apiVersion: v1
-kind: ServiceAccount
-metadata:
- labels:
- app.kubernetes.io/name: dubbo-admin
- helm.sh/chart: dubbo-admin-0.5.0
- app.kubernetes.io/instance: dubbo-admin
- app.kubernetes.io/managed-by: Helm
- name: dubbo-admin-test
- namespace: dubbo-system
- annotations:
- "helm.sh/hook": test-success
- "helm.sh/hook-delete-policy": "before-hook-creation,hook-succeeded"