Skip to content

Commit f2bf8a3

Browse files
feat: keep GatewayClass on uninstall via helm.sh/resource-policy when it's the default
Signed-off-by: Md. Istiak <mdistiak@appscode.com>
1 parent 17a13b0 commit f2bf8a3

9 files changed

Lines changed: 4 additions & 229 deletions

File tree

charts/service-gateway-presets/README.md

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -110,17 +110,6 @@ The following table lists the configurable parameters of the `service-gateway-pr
110110
| chart.sourceRef.kind | | <code>HelmRepository</code> |
111111
| chart.sourceRef.name | | <code>appscode-charts-oci</code> |
112112
| chart.sourceRef.namespace | | <code>kubeops</code> |
113-
| cleaner.enabled | | <code>true</code> |
114-
| cleaner.registry | | <code>ghcr.io/appscode</code> |
115-
| cleaner.repository | | <code>kubectl-nonroot</code> |
116-
| cleaner.tag | | <code>"1.34"</code> |
117-
| cleaner.pullPolicy | | <code>IfNotPresent</code> |
118-
| cleaner.securityContext.allowPrivilegeEscalation | | <code>false</code> |
119-
| cleaner.securityContext.privileged | | <code>false</code> |
120-
| cleaner.securityContext.readOnlyRootFilesystem | | <code>true</code> |
121-
| cleaner.securityContext.runAsNonRoot | | <code>true</code> |
122-
| cleaner.securityContext.runAsUser | | <code>65534</code> |
123-
| cleaner.securityContext.seccompProfile.type | | <code>RuntimeDefault</code> |
124113

125114

126115
Specify each parameter using the `--set key=value[,key=value]` argument to `helm upgrade -i`. For example:

charts/service-gateway-presets/values.yaml

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -151,20 +151,3 @@ chart:
151151
kind: HelmRepository
152152
name: appscode-charts-oci
153153
namespace: kubeops
154-
155-
cleaner:
156-
enabled: true
157-
registry: ghcr.io/appscode
158-
repository: kubectl-nonroot
159-
tag: "1.34"
160-
pullPolicy: IfNotPresent
161-
securityContext:
162-
allowPrivilegeEscalation: false
163-
capabilities:
164-
drop: ["ALL"]
165-
privileged: false
166-
readOnlyRootFilesystem: true
167-
runAsNonRoot: true
168-
runAsUser: 65534
169-
seccompProfile:
170-
type: RuntimeDefault

charts/service-gateway/README.md

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -104,17 +104,6 @@ The following table lists the configurable parameters of the `service-gateway` c
104104
| echoserver.securityContext | | <code>{"allowPrivilegeEscalation":false,"capabilities":{"drop":["ALL"]},"privileged":false,"readOnlyRootFilesystem":true,"runAsNonRoot":true,"runAsUser":65534,"seccompProfile":{"type":"RuntimeDefault"}}</code> |
105105
| vaultServer.name | Vault server name that exist on cluster | <code>"vault"</code> |
106106
| vaultServer.namespace | Vault server namespace that exist on cluster | <code>"ace"</code> |
107-
| cleaner.enabled | | <code>true</code> |
108-
| cleaner.registry | | <code>ghcr.io/appscode</code> |
109-
| cleaner.repository | | <code>kubectl-nonroot</code> |
110-
| cleaner.tag | | <code>"1.34"</code> |
111-
| cleaner.pullPolicy | | <code>IfNotPresent</code> |
112-
| cleaner.securityContext.allowPrivilegeEscalation | | <code>false</code> |
113-
| cleaner.securityContext.privileged | | <code>false</code> |
114-
| cleaner.securityContext.readOnlyRootFilesystem | | <code>true</code> |
115-
| cleaner.securityContext.runAsNonRoot | | <code>true</code> |
116-
| cleaner.securityContext.runAsUser | | <code>65534</code> |
117-
| cleaner.securityContext.seccompProfile.type | | <code>RuntimeDefault</code> |
118107

119108

120109
Specify each parameter using the `--set key=value[,key=value]` argument to `helm upgrade -i`. For example:

charts/service-gateway/templates/cleaner/job.yaml

Lines changed: 0 additions & 34 deletions
This file was deleted.

charts/service-gateway/templates/cleaner/rbac.yaml

Lines changed: 0 additions & 34 deletions
This file was deleted.

charts/service-gateway/templates/cleaner/serviceaccount.yaml

Lines changed: 0 additions & 11 deletions
This file was deleted.

charts/service-gateway/templates/gateway/gwclass.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ metadata:
1212
{{- with .Values.gatewayClass.annotations }}
1313
{{- toYaml . | nindent 4 }}
1414
{{- end }}
15+
{{- if eq (dig "catalog.appscode.com/is-default-gatewayclass" "" .Values.gatewayClass.annotations) "true" }}
16+
helm.sh/resource-policy: keep
17+
{{- end }}
1518
spec:
1619
controllerName: {{ .Values.gateway.config.envoyGateway.gateway.controllerName }}
1720
{{- with .Values.gatewayClass.description }}

charts/service-gateway/values.openapiv3_schema.yaml

Lines changed: 0 additions & 92 deletions
Original file line numberDiff line numberDiff line change
@@ -1,95 +1,4 @@
11
properties:
2-
cleaner:
3-
properties:
4-
enabled:
5-
type: boolean
6-
pullPolicy:
7-
type: string
8-
registry:
9-
type: string
10-
repository:
11-
type: string
12-
securityContext:
13-
properties:
14-
allowPrivilegeEscalation:
15-
type: boolean
16-
appArmorProfile:
17-
properties:
18-
localhostProfile:
19-
type: string
20-
type:
21-
type: string
22-
required:
23-
- type
24-
type: object
25-
capabilities:
26-
properties:
27-
add:
28-
items:
29-
type: string
30-
type: array
31-
x-kubernetes-list-type: atomic
32-
drop:
33-
items:
34-
type: string
35-
type: array
36-
x-kubernetes-list-type: atomic
37-
type: object
38-
privileged:
39-
type: boolean
40-
procMount:
41-
type: string
42-
readOnlyRootFilesystem:
43-
type: boolean
44-
runAsGroup:
45-
format: int64
46-
type: integer
47-
runAsNonRoot:
48-
type: boolean
49-
runAsUser:
50-
format: int64
51-
type: integer
52-
seLinuxOptions:
53-
properties:
54-
level:
55-
type: string
56-
role:
57-
type: string
58-
type:
59-
type: string
60-
user:
61-
type: string
62-
type: object
63-
seccompProfile:
64-
properties:
65-
localhostProfile:
66-
type: string
67-
type:
68-
type: string
69-
required:
70-
- type
71-
type: object
72-
windowsOptions:
73-
properties:
74-
gmsaCredentialSpec:
75-
type: string
76-
gmsaCredentialSpecName:
77-
type: string
78-
hostProcess:
79-
type: boolean
80-
runAsUserName:
81-
type: string
82-
type: object
83-
type: object
84-
tag:
85-
type: string
86-
required:
87-
- enabled
88-
- pullPolicy
89-
- registry
90-
- repository
91-
- tag
92-
type: object
932
cluster:
943
properties:
954
tls:
@@ -4768,7 +4677,6 @@ properties:
47684677
- name
47694678
type: object
47704679
required:
4771-
- cleaner
47724680
- cluster
47734681
- clusterMetadata
47744682
- echoserver

charts/service-gateway/values.yaml

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -145,22 +145,4 @@ vaultServer:
145145
# Vault server namespace that exist on cluster
146146
namespace: "ace"
147147

148-
# Post-delete hook that strips the GatewayClass finalizer so the chart uninstalls cleanly.
149-
# Disabled by default. Enable when the envoy-gateway controller is deployed as a sub-chart
150-
# and shuts down before it can remove the finalizer.
151-
cleaner:
152-
enabled: true
153-
registry: ghcr.io/appscode
154-
repository: kubectl-nonroot
155-
tag: "1.34"
156-
pullPolicy: IfNotPresent
157-
securityContext:
158-
allowPrivilegeEscalation: false
159-
capabilities:
160-
drop: ["ALL"]
161-
privileged: false
162-
readOnlyRootFilesystem: true
163-
runAsNonRoot: true
164-
runAsUser: 65534
165-
seccompProfile:
166-
type: RuntimeDefault
148+

0 commit comments

Comments
 (0)