Skip to content

Commit 52fc816

Browse files
authored
feat: ingress controller deployment add adc container (#194)
Signed-off-by: Ashing Zheng <[email protected]>
1 parent c36d9b5 commit 52fc816

File tree

3 files changed

+47
-0
lines changed

3 files changed

+47
-0
lines changed

charts/ingress-controller/README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@ Ingress Controller for API7
1212

1313
| Key | Type | Default | Description |
1414
|-----|------|---------|-------------|
15+
| adc.image.pullPolicy | string | `"IfNotPresent"` | |
16+
| adc.image.repository | string | `"ghcr.io/api7/adc"` | |
17+
| adc.image.tag | string | `"dev"` | |
18+
| adc.resources | object | `{}` | |
19+
| adc.securityContext | object | `{}` | |
1520
| autoscaling.enabled | bool | `false` | |
1621
| autoscaling.minReplicas | int | `1` | |
1722
| config.controllerName | string | `"apisix.apache.org/apisix-ingress-controller"` | |

charts/ingress-controller/templates/deployment.yaml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,40 @@ spec:
5858
{{- toYaml .Values.deployment.resources | nindent 10 }}
5959
securityContext:
6060
{{- toYaml .Values.deployment.podSecurityContext | nindent 10 }}
61+
- name: adc-server
62+
image: "{{ .Values.adc.image.repository }}:{{ .Values.adc.image.tag }}"
63+
args:
64+
- "server"
65+
- "--listen"
66+
- "http://127.0.0.1:3000"
67+
- "--listen-status"
68+
- "3001"
69+
env:
70+
- name: ADC_RUNNING_MODE
71+
value: "ingress"
72+
- name: ADC_EXPERIMENTAL_FEATURE_FLAGS
73+
value: "remote-state-file,parallel-backend-request"
74+
ports:
75+
- name: http-status
76+
containerPort: 3001
77+
protocol: TCP
78+
livenessProbe:
79+
httpGet:
80+
path: /healthz/ready
81+
port: 3001
82+
initialDelaySeconds: 10
83+
periodSeconds: 10
84+
timeoutSeconds: 10
85+
readinessProbe:
86+
httpGet:
87+
path: /healthz/ready
88+
port: 3001
89+
initialDelaySeconds: 5
90+
periodSeconds: 5
91+
resources:
92+
{{- toYaml .Values.adc.resources | nindent 10 }}
93+
securityContext:
94+
{{- toYaml .Values.adc.securityContext | nindent 10 }}
6195
{{- with .Values.deployment.nodeSelector }}
6296
nodeSelector:
6397
{{- toYaml . | nindent 8 }}

charts/ingress-controller/values.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,14 @@ deployment:
3535
# -- Set pod resource requests & limits
3636
resources: {}
3737

38+
adc:
39+
image:
40+
repository: ghcr.io/api7/adc
41+
tag: dev
42+
pullPolicy: IfNotPresent
43+
resources: {}
44+
securityContext: {}
45+
3846
config:
3947
logLevel: "info"
4048
controllerName: apisix.apache.org/apisix-ingress-controller

0 commit comments

Comments
 (0)