Skip to content

Commit fc27da4

Browse files
committed
resolve comments
1 parent d182c32 commit fc27da4

File tree

3 files changed

+61
-38
lines changed

3 files changed

+61
-38
lines changed

charts/templates/configmap.yaml

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,18 @@ metadata:
55
namespace: {{ .Release.Namespace }}
66
data:
77
config.yaml: |
8-
log_level: "{{ .Values.logLevel | default "debug" }}"
9-
10-
controller_name: {{ .Values.controllerName | default "apisix.apache.org/api7-ingress-controller" }}
11-
12-
leader_election_id: "api7-ingress-controller-leader"
8+
cert_file: {{ .Values.config.certFile | default "" }}
9+
key_file: {{ .Values.config.keyFile | default "" }}
10+
log_level: {{ .Values.config.logLevel | default "info" }}
11+
controller_name: {{ .Values.config.controllerName | default "apisix.apache.org/api7-ingress-controller" }}
12+
leader_election_id: {{ .Values.config.leaderElection.id | default "api7-ingress-controller-leader" }}
13+
leader_election:
14+
leaseDuration: {{ .Values.config.leaderElection.leaseDuration | default "15s" }}
15+
renewDeadline: {{ .Values.config.leaderElection.renewDeadline | default "10s" }}
16+
retryPeriod: {{ .Values.config.leaderElection.retryPeriod | default "2s" }}
17+
disable: {{ .Values.config.leaderElection.disable | default false }}
18+
metrics_addr: {{ .Values.config.metricsAddr | default ":8080" }}
19+
enable_http2: {{ .Values.config.enableHTTP2 | default false }}
20+
probe_addr: {{ .Values.config.probeAddr | default ":8081" }}
21+
secure_metrics: {{ .Values.config.secureMetrics | default "" }}
22+
exec_adc_timeout: {{ .Values.config.execADCTimeout | default "15s" }}

charts/templates/deployment.yaml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,19 @@ metadata:
66
name: {{ .Release.Name }}
77
namespace: {{ .Release.Namespace }}
88
annotations:
9-
{{- range $key, $value := .Values.annotations }}
9+
{{- range $key, $value := .Values.deployment.annotations }}
1010
{{ $key }}: {{ $value | quote }}
1111
{{- end }}
1212
spec:
13-
replicas: {{ .Values.replicas }}
13+
replicas: {{ .Values.deployment.replicas }}
1414
selector:
1515
matchLabels:
1616
{{- include "api7-ingress-controller-manager.selectorLabels" . | nindent 6 }}
1717
template:
1818
metadata:
1919
annotations:
20-
{{- if .Values.podAnnotations }}
21-
{{- range $key, $value := $.Values.podAnnotations }}
20+
{{- if .Values.deployment.podAnnotations }}
21+
{{- range $key, $value := $.Values.deployment.podAnnotations }}
2222
{{ $key }}: {{ $value | quote }}
2323
{{- end }}
2424
{{- end }}
@@ -35,7 +35,7 @@ spec:
3535
valueFrom:
3636
fieldRef:
3737
fieldPath: metadata.name
38-
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
38+
image: "{{ .Values.deployment.image.repository }}:{{ .Values.deployment.image.tag }}"
3939
volumeMounts:
4040
- name: {{ .Release.Name }}-ingress-config
4141
mountPath: /app/conf/config.yaml
@@ -61,20 +61,20 @@ spec:
6161
cpu: 10m
6262
memory: 64Mi
6363
securityContext:
64-
{{- toYaml .Values.podSecurityContext | nindent 10 }}
65-
{{- with .Values.nodeSelector }}
64+
{{- toYaml .Values.deployment.podSecurityContext | nindent 10 }}
65+
{{- with .Values.deployment.nodeSelector }}
6666
nodeSelector:
6767
{{- toYaml . | nindent 8 }}
6868
{{- end }}
69-
{{- with .Values.tolerations }}
69+
{{- with .Values.deployment.tolerations }}
7070
tolerations:
7171
{{- toYaml . | nindent 8 }}
7272
{{- end }}
73-
{{- with .Values.affinity }}
73+
{{- with .Values.deployment.affinity }}
7474
affinity:
7575
{{- toYaml . | nindent 8 }}
7676
{{- end }}
77-
{{- with .Values.topologySpreadConstraints }}
77+
{{- with .Values.deployment.topologySpreadConstraints }}
7878
topologySpreadConstraints:
7979
{{- tpl (. | toYaml) $ | nindent 8 }}
8080
{{- end }}

charts/values.yaml

Lines changed: 36 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,7 @@
11
nameOverride: ""
22
fullnameOverride: ""
33
labelsOverride: {}
4-
annotations: {}
5-
podAnnotations: {}
6-
controllerName: apisix.apache.org/api7-ingress-controller
7-
replicas: 1
8-
admin:
9-
key: '' # Pass the admin key generated for the ingress gateway group
10-
tlsVerify: false
11-
endpoint: '' #Dashboard endpoint
12-
statusAddress: ''
13-
logLevel: info
14-
nodeSelector: {}
15-
tolerations: []
16-
affinity: {}
17-
podSecurityContext:
18-
allowPrivilegeEscalation: false
19-
capabilities:
20-
drop:
21-
- ALL
4+
225
# -- See https://kubernetes.io/docs/tasks/run-application/configure-pdb/ for more details
236
podDisruptionBudget:
247
# -- Enable or disable podDisruptionBudget
@@ -31,12 +14,42 @@ podDisruptionBudget:
3114
maxUnavailable: 1
3215
# -- Topology Spread Constraints for pod assignment spread across your cluster among failure-domains
3316
# ref: https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/#spread-constraints-for-pods
34-
topologySpreadConstraints: []
35-
image:
36-
repository: api7/api7-ingress-controller
37-
pullPolicy: IfNotPresent
38-
tag: "dev"
3917

4018
autoscaling:
4119
enabled: false
4220
minReplicas: 1
21+
22+
deployment:
23+
annotations: {}
24+
podAnnotations: {}
25+
replicas: 1
26+
nodeSelector: {}
27+
tolerations: []
28+
affinity: {}
29+
podSecurityContext:
30+
allowPrivilegeEscalation: false
31+
capabilities:
32+
drop:
33+
- ALL
34+
topologySpreadConstraints: []
35+
image:
36+
repository: api7/api7-ingress-controller
37+
pullPolicy: IfNotPresent
38+
tag: "dev"
39+
40+
config:
41+
certFile: ""
42+
keyFile: ""
43+
logLevel: "info"
44+
controllerName: apisix.apache.org/api7-ingress-controller
45+
leaderElection:
46+
id: "api7-ingress-controller-leader"
47+
leaseDuration: "15s"
48+
renewDeadline: "10s"
49+
retryPeriod: "2s"
50+
disable: false
51+
metricsAddr: ":8080"
52+
enableHTTP2: false
53+
probeAddr: ":8081"
54+
secureMetrics: ""
55+
execADCTimeout: "15s"

0 commit comments

Comments
 (0)