Files
api7-demo/helm/api7ee-demo-k8s/templates/job-adc-sync.yaml
d.viti aeafd8c035
All checks were successful
Helm Chart Build / lint-only (push) Has been skipped
Helm Chart Build / build-helm (push) Successful in 26s
Build and Deploy / build-api (push) Successful in 1m8s
Build and Deploy / build-web (push) Successful in 1m31s
Add TLS skip verify support to ADC sync job
Added conditional --tls-skip-verify flag to ADC sync job arguments.
This flag is controlled by .Values.api7.adc.tlsSkipVerify and allows
ADC to connect to API7 Enterprise dashboard with self-signed certificates.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-08 18:40:46 +02:00

78 lines
2.3 KiB
YAML

{{- if .Values.api7.enabled }}
apiVersion: batch/v1
kind: Job
metadata:
name: {{ include "api7ee.fullname" . }}-adc-sync
labels:
{{- include "api7ee.labels" . | nindent 4 }}
app.kubernetes.io/component: adc-sync
annotations:
"helm.sh/hook": post-install,post-upgrade
"helm.sh/hook-weight": "10"
"helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded
spec:
backoffLimit: 3
activeDeadlineSeconds: 300
template:
metadata:
labels:
{{- include "api7ee.selectorLabels" . | nindent 8 }}
app.kubernetes.io/component: adc-sync
spec:
restartPolicy: Never
serviceAccountName: {{ include "api7ee.serviceAccountName" . }}
containers:
- name: adc-sync
image: ghcr.io/api7/adc:latest
imagePullPolicy: IfNotPresent
args:
- sync
- -f
- /config/adc-config.yaml
- --backend
- {{ .Values.api7.backend | default "api7ee" }}
- --server
- $(API7_ADMIN_URL)
- --token
- $(API7_ADMIN_KEY)
- --gateway-group
- $(API7_GATEWAY_GROUP)
{{- if .Values.api7.adc.tlsSkipVerify }}
- --tls-skip-verify
{{- end }}
{{- if .Values.api7.adc.verbose }}
- --verbose
{{- end }}
env:
- name: API7_ADMIN_URL
valueFrom:
secretKeyRef:
name: {{ include "api7ee.fullname" . }}-api7-admin
key: admin-url
- name: API7_ADMIN_KEY
valueFrom:
secretKeyRef:
name: {{ include "api7ee.fullname" . }}-api7-admin
key: admin-key
- name: API7_GATEWAY_GROUP
valueFrom:
secretKeyRef:
name: {{ include "api7ee.fullname" . }}-api7-admin
key: gateway-group
volumeMounts:
- name: adc-config
mountPath: /config
readOnly: true
resources:
limits:
cpu: 500m
memory: 256Mi
requests:
cpu: 100m
memory: 128Mi
volumes:
- name: adc-config
configMap:
name: {{ include "api7ee.fullname" . }}-adc-config
{{- end }}