Skip to content

Commit 4c74de9

Browse files
author
Leo Ryu
authored
fix(installer): stop uninstall gateway chart (#1903)
1 parent 95ee42e commit 4c74de9

File tree

2 files changed

+94
-93
lines changed

2 files changed

+94
-93
lines changed

Diff for: cmd/tke-installer/app/installer/installer.go

+13-13
Original file line numberDiff line numberDiff line change
@@ -317,14 +317,14 @@ func (t *TKE) initSteps() {
317317
}...)
318318
}
319319
t.steps = append(t.steps, []types.Handler{
320-
{
321-
Name: "Install ingress-nginx chart",
322-
Func: t.installIngressChart,
323-
},
324320
{
325321
Name: "Install tke-gateway chart",
326322
Func: t.installTKEGatewayChart,
327323
},
324+
{
325+
Name: "Install ingress-nginx chart",
326+
Func: t.installIngressChart,
327+
},
328328
}...)
329329
}
330330

@@ -1600,15 +1600,15 @@ func (t *TKE) installTKEGatewayChart(ctx context.Context) error {
16001600

16011601
chartFilePath := constants.ChartDirName + "tke-gateway/"
16021602
if _, err := t.helmClient.InstallWithLocal(installOptions, chartFilePath); err != nil {
1603-
uninstallOptions := helmaction.UninstallOptions{
1604-
Timeout: 10 * time.Minute,
1605-
ReleaseName: "tke-gateway",
1606-
Namespace: t.namespace,
1607-
}
1608-
reponse, err := t.helmClient.Uninstall(&uninstallOptions)
1609-
if err != nil {
1610-
return fmt.Errorf("%s uninstall fail, err = %s", reponse.Release.Name, err.Error())
1611-
}
1603+
// uninstallOptions := helmaction.UninstallOptions{
1604+
// Timeout: 10 * time.Minute,
1605+
// ReleaseName: "tke-gateway",
1606+
// Namespace: t.namespace,
1607+
// }
1608+
// reponse, err := t.helmClient.Uninstall(&uninstallOptions)
1609+
// if err != nil {
1610+
// return fmt.Errorf("%s uninstall fail, err = %s", reponse.Release.Name, err.Error())
1611+
// }
16121612
return err
16131613
}
16141614

Diff for: cmd/tke-installer/app/installer/manifests/charts/tke-gateway/templates/tke-gateway.yaml

+81-80
Original file line numberDiff line numberDiff line change
@@ -1,84 +1,4 @@
11
---
2-
kind: Service
3-
apiVersion: v1
4-
metadata:
5-
name: tke-gateway
6-
namespace: tke
7-
annotations:
8-
tke.prometheus.io/scrape: "true"
9-
prometheus.io/scheme: https
10-
prometheus.io/port: "9441"
11-
spec:
12-
selector:
13-
app: tke-gateway
14-
ports:
15-
- name: http
16-
nodePort: 31180
17-
port: 80
18-
protocol: TCP
19-
targetPort: 80
20-
- name: https
21-
nodePort: 31443
22-
port: 443
23-
protocol: TCP
24-
targetPort: 443
25-
---
26-
apiVersion: apps/v1
27-
kind: DaemonSet
28-
metadata:
29-
name: tke-gateway
30-
namespace: tke
31-
spec:
32-
selector:
33-
matchLabels:
34-
app: tke-gateway
35-
template:
36-
metadata:
37-
labels:
38-
app: tke-gateway
39-
spec:
40-
dnsPolicy: ClusterFirstWithHostNet
41-
nodeSelector:
42-
node-role.kubernetes.io/master: ""
43-
containers:
44-
- name: tke-gateway
45-
image: {{ .Values.image }}
46-
args:
47-
- -C=/app/conf/tke-gateway.toml
48-
volumeMounts:
49-
- name: certs-volume
50-
mountPath: /app/certs
51-
- name: tke-gateway-volume
52-
mountPath: /app/conf
53-
readinessProbe:
54-
httpGet:
55-
port: 80
56-
path: /healthz
57-
scheme: HTTP
58-
initialDelaySeconds: 5
59-
periodSeconds: 10
60-
livenessProbe:
61-
httpGet:
62-
port: 80
63-
path: /healthz
64-
scheme: HTTP
65-
initialDelaySeconds: 15
66-
periodSeconds: 20
67-
resources:
68-
limits:
69-
cpu: 100m
70-
memory: 256Mi
71-
requests:
72-
cpu: 50m
73-
memory: 128Mi
74-
volumes:
75-
- name: certs-volume
76-
configMap:
77-
name: certs
78-
- name: tke-gateway-volume
79-
configMap:
80-
name: tke-gateway
81-
---
822
apiVersion: v1
833
kind: ConfigMap
844
metadata:
@@ -189,3 +109,84 @@ data:
189109
server.key: |
190110
{{ .Values.serverKey | indent 4 }}
191111
{{- end }}
112+
113+
---
114+
kind: Service
115+
apiVersion: v1
116+
metadata:
117+
name: tke-gateway
118+
namespace: tke
119+
annotations:
120+
tke.prometheus.io/scrape: "true"
121+
prometheus.io/scheme: https
122+
prometheus.io/port: "9441"
123+
spec:
124+
selector:
125+
app: tke-gateway
126+
ports:
127+
- name: http
128+
nodePort: 31180
129+
port: 80
130+
protocol: TCP
131+
targetPort: 80
132+
- name: https
133+
nodePort: 31443
134+
port: 443
135+
protocol: TCP
136+
targetPort: 443
137+
---
138+
apiVersion: apps/v1
139+
kind: DaemonSet
140+
metadata:
141+
name: tke-gateway
142+
namespace: tke
143+
spec:
144+
selector:
145+
matchLabels:
146+
app: tke-gateway
147+
template:
148+
metadata:
149+
labels:
150+
app: tke-gateway
151+
spec:
152+
dnsPolicy: ClusterFirstWithHostNet
153+
nodeSelector:
154+
node-role.kubernetes.io/master: ""
155+
containers:
156+
- name: tke-gateway
157+
image: {{ .Values.image }}
158+
args:
159+
- -C=/app/conf/tke-gateway.toml
160+
volumeMounts:
161+
- name: certs-volume
162+
mountPath: /app/certs
163+
- name: tke-gateway-volume
164+
mountPath: /app/conf
165+
readinessProbe:
166+
httpGet:
167+
port: 80
168+
path: /healthz
169+
scheme: HTTP
170+
initialDelaySeconds: 5
171+
periodSeconds: 10
172+
livenessProbe:
173+
httpGet:
174+
port: 80
175+
path: /healthz
176+
scheme: HTTP
177+
initialDelaySeconds: 15
178+
periodSeconds: 20
179+
resources:
180+
limits:
181+
cpu: 100m
182+
memory: 256Mi
183+
requests:
184+
cpu: 50m
185+
memory: 128Mi
186+
volumes:
187+
- name: certs-volume
188+
configMap:
189+
name: certs
190+
- name: tke-gateway-volume
191+
configMap:
192+
name: tke-gateway

0 commit comments

Comments
 (0)