dipup 사용 차트를 카탈로그에 동기화 (7개 갱신 + 5개 신규)
dipup 이 go:embed 로 직접 보관·관리하던 Helm 차트를 카탈로그로 옮기는 첫 단계다.
두 저장소가 각자 CVE/SBOM 파이프라인을 운영하는 이중화를 해소하려면, 먼저 카탈로그가
dipup 과 같은 차트·같은 이미지를 보게 만들어야 한다.
배경: CVE 파이프라인 구성 이전에 두 곳에서 같은 차트를 유지하기 어려워 dipup 이 별도로
차트를 관리해 왔고, 그 결과 버전이 갈라졌다. 겹치는 10개 중 버전까지 일치하는 것은
postgresql-ha·dnsup 2개뿐이었다.
## 버전 갱신 (7개) — 신규 버전 디렉토리 추가, 구버전은 보존
| 차트 | 기존 | 신규 | appVersion |
|---|---|---|---|
| apisix | 2.14.0 | 2.16.0 | 3.16.0 → 3.17.0 |
| argo-cd | 7.7.0 | 7.8.11 | v2.13.0 → v2.14.5 |
| cert-manager | v1.16.1 | v1.21.0 | 동일 |
| gitea | 12.4.0 | 12.6.0 | 1.24.6 → 1.26.1 |
| harbor | 1.16.2 | 1.19.1 | 2.12.2 → 2.15.1 |
| kyverno | 3.4.1 | 3.8.2 | v1.14.1 → v1.18.2 |
| rancher | 2.10.1 | 2.14.3 | v2.10.1 → v2.14.3 |
차트 본문은 dipup 이 임베딩한 .tgz 를 그대로 전개했다(네트워크 pull 이 아니라 dipup 이
실제 배포하는 바이트와 동일함을 보장하기 위함). BUILD-README/CUSTOM-README/custom-values
3개 파일은 구버전에서 승계했다.
## 신규 추가 (5개)
infisical-standalone 1.9.0, longhorn 109.3.1+up1.11.2, longhorn-crd 109.3.1+up1.11.2,
metallb 0.16.1, secrets-operator v0.10.33.
longhorn/longhorn-crd 는 업스트림이 아니라 Rancher 패키징 차트(109.x 라인, Rancher 2.14
계열과 짝)다. BUILD-README 의 `helm repo add` 라인은 chart_version_detector 가 파싱하는
계약이라 실제 업스트림 repo 를 검증해 기재했고, 감지기로 현재/최신 버전이 정상 조회되는
것을 확인했다.
## custom-values — 버전과 결합된 이미지 핀 정리
카탈로그 스캐너가 dipup 의 effective image 를 보게 하려면 이미지 핀이 맞아야 한다.
- **kyverno: 승계본이 3.8.2 에서 깨져 재작성.** 3.4.1 은 정리 훅이
`registry: ~ / repository: bitnami/kubectl` 이라 bitnamilegacy 오버라이드가 맞았지만,
3.8.2 는 `registry: ghcr.io / repository: kyverno/readiness-checker` 로 바뀌었다.
그대로 옮기면 ghcr.io/bitnamilegacy/kubectl 이라는 없는 좌표가 된다. 해당 오버라이드를
제거하고, 3.8.2 에서 삭제된 policyReportsCleanup 키도 함께 뺐다. 남는 조치는 tag 고정뿐
(기본 tag 가 비어 latest 로 떨어짐 → v1.18.2 로 고정).
- apisix: 3.16.0-keycloak-authz → 3.17.0-keycloak-authz (차트 appVersion 과 함께 이동)
- gitea: image.tag 1.26.4 핀 추가 — 차트 기본 1.26.1 대비 CRITICAL 2→0, HIGH 44→12
- infisical: image.tag v0.162.7 핀 — 기본 v0.158.x 는 stale Debian base 로 OS 기인 CVE
다수(fixable CRITICAL 53→5, HIGH 491→55). redis/postgresql 은 bitnamilegacy 좌표로.
- longhorn: 실측 기반 리소스 튜닝(manager request, guaranteedInstanceManagerCPU,
systemManagedCSIComponentsResourceLimits). replica 수처럼 노드 수에 의존하는 값은
넣지 않았다 — 소비 측에서 주입한다.
## 검증
12개 차트 전부 `helm template --kube-version 1.34.1` 렌더 성공. 렌더 결과 이미지가
dipup 배포 이미지와 일치함을 확인(paasup/apisix:3.17.0-keycloak-authz,
gitea:1.26.4-rootless, readiness-checker:v1.18.2, infisical:v0.162.7).
## 범위에서 뺀 것
- **keycloak**: 카탈로그는 codecentric(app 17.0.1-legacy), dipup 은 bitnami(app 26.2.4)로
계보가 다르다. 이슈 #1(bitnami 대체 방안 검토)의 결론이 나온 뒤 처리한다.
- **rancher-monitoring(-crd)**: 14c05f1 에서 불필요 판단으로 제거된 차트이고
victoria-metrics 스택으로 대체 예정이라 추가하지 않는다.
- **dip-api/dip-console**: 자체 개발 차트로 각 앱 저장소가 출처다. 대조 결과 앱 저장소와
dipup 사본이 일치해 카탈로그가 개입할 이유가 없다.
- **postgresql-ha/dnsup**: 이미 버전이 일치해 작업 대상이 아니었다.
## 후속 과제
dnsup 은 카탈로그·dipup 사본(1.0.1)이 원본(dip-console-api helm/dnsup 1.0.0)보다 앞서
있다. 1.0.1 에만 있는 service.LoadBalancerIP·service.annotations 지원을 원본으로 백포트한
뒤, 카탈로그에서 dnsup 을 제거하는 것이 자체 개발 차트 출처 원칙에 맞다.
This commit is contained in:
@@ -0,0 +1,89 @@
|
||||
#
|
||||
# Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
# contributor license agreements. See the NOTICE file distributed with
|
||||
# this work for additional information regarding copyright ownership.
|
||||
# The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
# (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
{{/*
|
||||
Expand the name of the chart.
|
||||
*/}}
|
||||
{{- define "apisix-ingress-controller-manager.name" -}}
|
||||
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
|
||||
{{- end }}
|
||||
{{/*
|
||||
Create a default fully qualified app name.
|
||||
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
|
||||
If release name contains chart name it will be used as a full name.
|
||||
*/}}
|
||||
{{- define "apisix-ingress-controller-manager.name.fullname" -}}
|
||||
{{- if .Values.fullnameOverride }}
|
||||
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
|
||||
{{- else }}
|
||||
{{- $name := default .Chart.Name .Values.nameOverride }}
|
||||
{{- if contains $name .Release.Name }}
|
||||
{{- .Release.Name | trunc 63 | trimSuffix "-" }}
|
||||
{{- else }}
|
||||
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{/*
|
||||
Create chart name and version as used by the chart label.
|
||||
*/}}
|
||||
{{- define "apisix-ingress-controller-manager.chart" -}}
|
||||
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
|
||||
{{- end }}
|
||||
{{/*
|
||||
Common labels
|
||||
*/}}
|
||||
{{- define "apisix-ingress-controller-manager.labels" -}}
|
||||
helm.sh/chart: {{ include "apisix-ingress-controller-manager.chart" . }}
|
||||
{{ include "apisix-ingress-controller-manager.selectorLabels" . }}
|
||||
{{- if .Chart.AppVersion }}
|
||||
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
|
||||
{{- end }}
|
||||
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Selector labels
|
||||
*/}}
|
||||
{{- define "apisix-ingress-controller-manager.selectorLabels" -}}
|
||||
{{- if .Values.labelsOverride }}
|
||||
{{- tpl (.Values.labelsOverride | toYaml) . }}
|
||||
{{- else }}
|
||||
app.kubernetes.io/name: {{ include "apisix-ingress-controller-manager.name" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Webhook service name - ensure it stays within 63 character limit
|
||||
*/}}
|
||||
{{- define "apisix-ingress-controller-manager.webhook.serviceName" -}}
|
||||
{{- $suffix := "-webhook-svc" -}}
|
||||
{{- $maxLen := sub 63 (len $suffix) | int -}}
|
||||
{{- $baseName := include "apisix-ingress-controller-manager.name.fullname" . | trunc $maxLen | trimSuffix "-" -}}
|
||||
{{- printf "%s%s" $baseName $suffix -}}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Webhook secret name - ensure it stays within 63 character limit
|
||||
*/}}
|
||||
{{- define "apisix-ingress-controller-manager.webhook.secretName" -}}
|
||||
{{- $suffix := "-webhook-cert" -}}
|
||||
{{- $maxLen := sub 63 (len $suffix) | int -}}
|
||||
{{- $baseName := include "apisix-ingress-controller-manager.name.fullname" . | trunc $maxLen | trimSuffix "-" -}}
|
||||
{{- printf "%s%s" $baseName $suffix -}}
|
||||
{{- end }}
|
||||
+182
@@ -0,0 +1,182 @@
|
||||
#
|
||||
# Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
# contributor license agreements. See the NOTICE file distributed with
|
||||
# this work for additional information regarding copyright ownership.
|
||||
# The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
# (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
name: {{ .Release.Name }}-apisix-ingress-manager-role
|
||||
rules:
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- events
|
||||
verbs:
|
||||
- create
|
||||
- patch
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- namespaces
|
||||
- pods
|
||||
- secrets
|
||||
- services
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- apisix.apache.org
|
||||
resources:
|
||||
- apisixconsumers
|
||||
- apisixglobalrules
|
||||
- apisixpluginconfigs
|
||||
- apisixroutes
|
||||
- apisixtlses
|
||||
- apisixupstreams
|
||||
- backendtrafficpolicies
|
||||
- consumers
|
||||
- gatewayproxies
|
||||
- httproutepolicies
|
||||
- pluginconfigs
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- apisix.apache.org
|
||||
resources:
|
||||
- apisixconsumers/status
|
||||
- apisixglobalrules/status
|
||||
- apisixpluginconfigs/status
|
||||
- apisixroutes/status
|
||||
- apisixtlses/status
|
||||
- apisixupstreams/status
|
||||
- backendtrafficpolicies/status
|
||||
- consumers/status
|
||||
- httproutepolicies/status
|
||||
verbs:
|
||||
- get
|
||||
- update
|
||||
- apiGroups:
|
||||
- coordination.k8s.io
|
||||
resources:
|
||||
- leases
|
||||
verbs:
|
||||
- create
|
||||
- delete
|
||||
- get
|
||||
- list
|
||||
- patch
|
||||
- update
|
||||
- watch
|
||||
- apiGroups:
|
||||
- discovery.k8s.io
|
||||
resources:
|
||||
- endpointslices
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- gateway.networking.k8s.io
|
||||
resources:
|
||||
- gatewayclasses
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- update
|
||||
- watch
|
||||
- apiGroups:
|
||||
- gateway.networking.k8s.io
|
||||
resources:
|
||||
- gatewayclasses/status
|
||||
- gateways/status
|
||||
- grpcroutes/status
|
||||
- httproutes/status
|
||||
- tcproutes/status
|
||||
- udproutes/status
|
||||
- tlsroutes/status
|
||||
- referencegrants/status
|
||||
verbs:
|
||||
- get
|
||||
- update
|
||||
- apiGroups:
|
||||
- gateway.networking.k8s.io
|
||||
resources:
|
||||
- gateways
|
||||
- grpcroutes
|
||||
- httproutes
|
||||
- tcproutes
|
||||
- udproutes
|
||||
- tlsroutes
|
||||
- referencegrants
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- networking.k8s.io
|
||||
resources:
|
||||
- ingressclasses
|
||||
- ingresses
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- networking.k8s.io
|
||||
resources:
|
||||
- ingresses/status
|
||||
verbs:
|
||||
- get
|
||||
- update
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- endpoints
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
name: {{ .Release.Name }}-apisix-ingress-metrics-auth-role
|
||||
rules:
|
||||
- apiGroups:
|
||||
- authentication.k8s.io
|
||||
resources:
|
||||
- tokenreviews
|
||||
verbs:
|
||||
- create
|
||||
- apiGroups:
|
||||
- authorization.k8s.io
|
||||
resources:
|
||||
- subjectaccessreviews
|
||||
verbs:
|
||||
- create
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
name: {{ .Release.Name }}-apisix-ingress-metrics-reader
|
||||
rules:
|
||||
- nonResourceURLs:
|
||||
- /metrics
|
||||
verbs:
|
||||
- get
|
||||
+43
@@ -0,0 +1,43 @@
|
||||
#
|
||||
# Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
# contributor license agreements. See the NOTICE file distributed with
|
||||
# this work for additional information regarding copyright ownership.
|
||||
# The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
# (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRoleBinding
|
||||
metadata:
|
||||
labels:
|
||||
{{- include "apisix-ingress-controller-manager.labels" . | nindent 4 }}
|
||||
name: {{ .Release.Name }}-apisix-ingress-manager-rolebinding
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: ClusterRole
|
||||
name: {{ .Release.Name }}-apisix-ingress-manager-role
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: {{ .Release.Name }}
|
||||
namespace: {{ .Release.Namespace }}
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRoleBinding
|
||||
metadata:
|
||||
name: {{ .Release.Name }}-apisix-ingress-metrics-auth-rolebinding
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: ClusterRole
|
||||
name: {{ .Release.Name }}-apisix-ingress-metrics-auth-role
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: {{ .Release.Name }}
|
||||
namespace: {{ .Release.Namespace }}
|
||||
+50
@@ -0,0 +1,50 @@
|
||||
#
|
||||
# Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
# contributor license agreements. See the NOTICE file distributed with
|
||||
# this work for additional information regarding copyright ownership.
|
||||
# The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
# (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: {{ .Release.Name }}-ingress-config
|
||||
namespace: {{ .Release.Namespace }}
|
||||
data:
|
||||
config.yaml: |
|
||||
log_level: {{ .Values.config.logLevel | default "info" }}
|
||||
controller_name: {{ .Values.config.controllerName | default "apisix.apache.org/apisix-ingress-controller" }}
|
||||
leader_election_id: {{ .Values.config.leaderElection.id | default "apisix-ingress-controller-leader" }}
|
||||
leader_election:
|
||||
leaseDuration: {{ .Values.config.leaderElection.leaseDuration | default "15s" }}
|
||||
renewDeadline: {{ .Values.config.leaderElection.renewDeadline | default "10s" }}
|
||||
retryPeriod: {{ .Values.config.leaderElection.retryPeriod | default "2s" }}
|
||||
disable: {{ .Values.config.leaderElection.disable | default false }}
|
||||
metrics_addr: {{ .Values.config.metricsAddr | default ":8080" }}
|
||||
enable_http2: {{ .Values.config.enableHTTP2 | default false }}
|
||||
probe_addr: {{ .Values.config.probeAddr | default ":8081" }}
|
||||
secure_metrics: {{ .Values.config.secureMetrics | default false }}
|
||||
exec_adc_timeout: {{ .Values.config.execADCTimeout | default "15s" }}
|
||||
disable_gateway_api: {{ .Values.config.disableGatewayAPI | default false }}
|
||||
listener_port_match_mode: {{ .Values.config.listenerPortMatchMode | default "auto" }}
|
||||
provider:
|
||||
type: {{ .Values.config.provider.type | default "apisix" }}
|
||||
sync_period: {{ .Values.config.provider.syncPeriod | default "1s" }}
|
||||
init_sync_delay: {{ .Values.config.provider.initSyncDelay | default "20m" }}
|
||||
{{- if .Values.webhook.enabled }}
|
||||
webhook:
|
||||
enable: true
|
||||
port: {{ .Values.webhook.port }}
|
||||
tls_cert_file: "tls.crt"
|
||||
tls_key_file: "tls.key"
|
||||
tls_cert_dir: "/certs"
|
||||
{{- end }}
|
||||
+173
@@ -0,0 +1,173 @@
|
||||
#
|
||||
# Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
# contributor license agreements. See the NOTICE file distributed with
|
||||
# this work for additional information regarding copyright ownership.
|
||||
# The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
# (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: {{ include "apisix-ingress-controller-manager.name.fullname" . }}
|
||||
namespace: {{ .Release.Namespace }}
|
||||
annotations:
|
||||
{{- range $key, $value := .Values.deployment.annotations }}
|
||||
{{ $key }}: {{ $value | quote }}
|
||||
{{- end }}
|
||||
labels:
|
||||
{{- include "apisix-ingress-controller-manager.labels" . | nindent 4 }}
|
||||
spec:
|
||||
replicas: {{ .Values.deployment.replicas }}
|
||||
selector:
|
||||
matchLabels:
|
||||
{{- include "apisix-ingress-controller-manager.selectorLabels" . | nindent 6 }}
|
||||
template:
|
||||
metadata:
|
||||
annotations:
|
||||
checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
|
||||
{{- if .Values.deployment.podAnnotations }}
|
||||
{{- range $key, $value := $.Values.deployment.podAnnotations }}
|
||||
{{ $key }}: {{ $value | quote }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
labels:
|
||||
{{- include "apisix-ingress-controller-manager.selectorLabels" . | nindent 8 }}
|
||||
spec:
|
||||
{{- $imagePullSecrets := .Values.deployment.imagePullSecrets | default ((.Values.global).imagePullSecrets | default list) }}
|
||||
{{- with $imagePullSecrets }}
|
||||
imagePullSecrets:
|
||||
{{- range $imagePullSecrets }}
|
||||
- name: {{ . }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
containers:
|
||||
- env:
|
||||
- name: POD_NAMESPACE
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: metadata.namespace
|
||||
- name: POD_NAME
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: metadata.name
|
||||
- name: ADC_SERVER_URL
|
||||
value: "unix:/sockets/adc.sock"
|
||||
image: "{{ .Values.deployment.image.repository }}:{{ .Values.deployment.image.tag }}"
|
||||
imagePullPolicy: {{ .Values.deployment.image.pullPolicy }}
|
||||
ports:
|
||||
- containerPort: {{ splitList ":" .Values.config.metricsAddr | last | int }}
|
||||
name: metrics
|
||||
protocol: TCP
|
||||
{{- if .Values.webhook.enabled }}
|
||||
- containerPort: {{ .Values.webhook.port }}
|
||||
name: webhook
|
||||
protocol: TCP
|
||||
{{- end }}
|
||||
volumeMounts:
|
||||
- name: {{ .Release.Name }}-ingress-config
|
||||
mountPath: /app/conf/config.yaml
|
||||
subPath: config.yaml
|
||||
- name: socket-volume
|
||||
mountPath: /sockets
|
||||
{{- if .Values.webhook.enabled }}
|
||||
- name: webhook-certs
|
||||
mountPath: /certs
|
||||
readOnly: true
|
||||
{{- end }}
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /healthz
|
||||
port: 8081
|
||||
initialDelaySeconds: 15
|
||||
periodSeconds: 20
|
||||
name: manager
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /readyz
|
||||
port: 8081
|
||||
initialDelaySeconds: 5
|
||||
periodSeconds: 10
|
||||
resources:
|
||||
{{- toYaml .Values.deployment.resources | nindent 10 }}
|
||||
securityContext:
|
||||
{{- toYaml .Values.deployment.securityContext | nindent 10 }}
|
||||
- name: adc-server
|
||||
image: "{{ .Values.deployment.adcContainer.image.repository }}:{{ .Values.deployment.adcContainer.image.tag }}"
|
||||
imagePullPolicy: {{ .Values.deployment.image.pullPolicy }}
|
||||
args:
|
||||
- "server"
|
||||
- "--listen"
|
||||
- "unix:/sockets/adc.sock"
|
||||
- "--listen-status"
|
||||
- "3001"
|
||||
env:
|
||||
- name: ADC_RUNNING_MODE
|
||||
value: "ingress"
|
||||
- name: ADC_EXPERIMENTAL_FEATURE_FLAGS
|
||||
value: "remote-state-file,parallel-backend-request"
|
||||
- name: ADC_INGRESS_LOG_LEVEL
|
||||
value: "{{ .Values.deployment.adcContainer.config.logLevel }}"
|
||||
ports:
|
||||
- name: http-status
|
||||
containerPort: 3001
|
||||
protocol: TCP
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /healthz/ready
|
||||
port: 3001
|
||||
initialDelaySeconds: 10
|
||||
periodSeconds: 10
|
||||
timeoutSeconds: 10
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /healthz/ready
|
||||
port: 3001
|
||||
initialDelaySeconds: 5
|
||||
periodSeconds: 5
|
||||
volumeMounts:
|
||||
- name: socket-volume
|
||||
mountPath: /sockets
|
||||
resources:
|
||||
{{- toYaml .Values.deployment.resources | nindent 10 }}
|
||||
securityContext:
|
||||
{{- toYaml .Values.deployment.securityContext | nindent 10 }}
|
||||
{{- with .Values.deployment.nodeSelector }}
|
||||
nodeSelector:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.deployment.tolerations }}
|
||||
tolerations:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.deployment.affinity }}
|
||||
affinity:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.deployment.topologySpreadConstraints }}
|
||||
topologySpreadConstraints:
|
||||
{{- tpl (. | toYaml) $ | nindent 8 }}
|
||||
{{- end }}
|
||||
volumes:
|
||||
- name: {{ .Release.Name }}-ingress-config
|
||||
configMap:
|
||||
name: {{ .Release.Name }}-ingress-config
|
||||
- name: socket-volume
|
||||
emptyDir: {}
|
||||
{{- if .Values.webhook.enabled }}
|
||||
- name: webhook-certs
|
||||
secret:
|
||||
secretName: {{ include "apisix-ingress-controller-manager.webhook.secretName" . }}
|
||||
{{- end }}
|
||||
securityContext:
|
||||
{{- toYaml .Values.deployment.podSecurityContext | nindent 8 }}
|
||||
serviceAccountName: {{ .Release.Name }}
|
||||
terminationGracePeriodSeconds: 10
|
||||
+76
@@ -0,0 +1,76 @@
|
||||
#
|
||||
# Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
# contributor license agreements. See the NOTICE file distributed with
|
||||
# this work for additional information regarding copyright ownership.
|
||||
# The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
# (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
{{- if .Values.gatewayProxy.createDefault }}
|
||||
apiVersion: apisix.apache.org/v1alpha1
|
||||
kind: GatewayProxy
|
||||
metadata:
|
||||
namespace: {{ .Release.Namespace }}
|
||||
name: {{ .Release.Name }}-config
|
||||
spec:
|
||||
provider:
|
||||
type: {{ .Values.gatewayProxy.provider.type }}
|
||||
controlPlane:
|
||||
{{- if .Values.gatewayProxy.provider.controlPlane.endpoints }}
|
||||
endpoints:
|
||||
{{- toYaml .Values.gatewayProxy.provider.controlPlane.endpoints | nindent 8 }}
|
||||
{{- else if .Values.gatewayProxy.provider.controlPlane.service.name }}
|
||||
service:
|
||||
name: {{ .Values.gatewayProxy.provider.controlPlane.service.name }}
|
||||
port: {{ .Values.gatewayProxy.provider.controlPlane.service.port }}
|
||||
{{- else }}
|
||||
service:
|
||||
name: {{ .Values.apisix.adminService.name }}
|
||||
port: {{ .Values.apisix.adminService.port }}
|
||||
{{- end }}
|
||||
|
||||
{{- with .Values.gatewayProxy.provider.controlPlane.tlsVerify }}
|
||||
tlsVerify: {{ . }}
|
||||
{{- end }}
|
||||
|
||||
{{- with .Values.gatewayProxy.provider.controlPlane.auth }}
|
||||
auth:
|
||||
type: {{ .type }}
|
||||
{{- with .adminKey }}
|
||||
adminKey:
|
||||
{{- if .valueFrom }}
|
||||
valueFrom:
|
||||
{{- toYaml .valueFrom | nindent 12 }}
|
||||
{{- else if .value }}
|
||||
value: {{ .value | quote }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{- with .Values.gatewayProxy.publishService }}
|
||||
publishService: {{ . | quote }}
|
||||
{{- end }}
|
||||
|
||||
{{- with .Values.gatewayProxy.statusAddress }}
|
||||
statusAddress:
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
|
||||
{{- with .Values.gatewayProxy.plugins }}
|
||||
plugins:
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
|
||||
{{- with .Values.gatewayProxy.pluginMetadata }}
|
||||
pluginMetadata:
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
+34
@@ -0,0 +1,34 @@
|
||||
#
|
||||
# Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
# contributor license agreements. See the NOTICE file distributed with
|
||||
# this work for additional information regarding copyright ownership.
|
||||
# The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
# (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: IngressClass
|
||||
metadata:
|
||||
name: {{ .Values.config.kubernetes.ingressClass }}
|
||||
{{- if .Values.config.kubernetes.defaultIngressClass }}
|
||||
annotations:
|
||||
ingressclass.kubernetes.io/is-default-class: "true"
|
||||
{{- end }}
|
||||
spec:
|
||||
controller: {{ .Values.config.controllerName | default "apisix.apache.org/apisix-ingress-controller" }}
|
||||
{{- if .Values.gatewayProxy.createDefault }}
|
||||
parameters:
|
||||
apiGroup: apisix.apache.org
|
||||
kind: GatewayProxy
|
||||
name: {{ .Release.Name }}-config
|
||||
namespace: {{ .Release.Namespace }}
|
||||
scope: Namespace
|
||||
{{- end}}
|
||||
@@ -0,0 +1,38 @@
|
||||
#
|
||||
# Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
# contributor license agreements. See the NOTICE file distributed with
|
||||
# this work for additional information regarding copyright ownership.
|
||||
# The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
# (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
{{- if and .Values.podDisruptionBudget.enabled (or (and .Values.autoscaling.enabled (gt (.Values.autoscaling.minReplicas | int) 1)) (and (not .Values.autoscaling.enabled) (gt (.Values.deployment.replicas | int) 1))) }}
|
||||
{{ if semverCompare "<1.21-0" .Capabilities.KubeVersion.Version -}}
|
||||
apiVersion: policy/v1beta1
|
||||
{{- else -}}
|
||||
apiVersion: policy/v1
|
||||
{{- end }}
|
||||
kind: PodDisruptionBudget
|
||||
metadata:
|
||||
name: {{ include "apisix-ingress-controller.fullname" . }}
|
||||
namespace: {{ .Release.Namespace }}
|
||||
labels:
|
||||
{{- include "apisix-ingress-controller.labels" . | nindent 4 }}
|
||||
spec:
|
||||
{{- if .Values.podDisruptionBudget.minAvailable }}
|
||||
minAvailable: {{ .Values.podDisruptionBudget.minAvailable }}
|
||||
{{- else }}
|
||||
maxUnavailable: {{ .Values.podDisruptionBudget.maxUnavailable }}
|
||||
{{- end }}
|
||||
selector:
|
||||
matchLabels:
|
||||
{{- include "apisix-ingress-controller.selectorLabels" . | nindent 6 }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,55 @@
|
||||
#
|
||||
# Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
# contributor license agreements. See the NOTICE file distributed with
|
||||
# this work for additional information regarding copyright ownership.
|
||||
# The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
# (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: Role
|
||||
metadata:
|
||||
labels:
|
||||
{{- include "apisix-ingress-controller-manager.labels" . | nindent 4 }}
|
||||
name: {{ .Release.Name }}-apisix-ingress-leader-election-role
|
||||
namespace: {{ .Release.Namespace }}
|
||||
rules:
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- configmaps
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- create
|
||||
- update
|
||||
- patch
|
||||
- delete
|
||||
- apiGroups:
|
||||
- coordination.k8s.io
|
||||
resources:
|
||||
- leases
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- create
|
||||
- update
|
||||
- patch
|
||||
- delete
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- events
|
||||
verbs:
|
||||
- create
|
||||
- patch
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
#
|
||||
# Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
# contributor license agreements. See the NOTICE file distributed with
|
||||
# this work for additional information regarding copyright ownership.
|
||||
# The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
# (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: RoleBinding
|
||||
metadata:
|
||||
labels:
|
||||
{{- include "apisix-ingress-controller-manager.labels" . | nindent 4 }}
|
||||
name: {{ .Release.Name }}-apisix-ingress-leader-election-rolebinding
|
||||
namespace: {{ .Release.Namespace }}
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: Role
|
||||
name: {{ .Release.Name }}-apisix-ingress-leader-election-role
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: {{ .Release.Name }}
|
||||
namespace: {{ .Release.Namespace }}
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
#
|
||||
# Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
# contributor license agreements. See the NOTICE file distributed with
|
||||
# this work for additional information regarding copyright ownership.
|
||||
# The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
# (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
labels:
|
||||
{{- include "apisix-ingress-controller-manager.labels" . | nindent 4 }}
|
||||
name: {{ .Release.Name }}
|
||||
namespace: {{ .Release.Namespace }}
|
||||
@@ -0,0 +1,31 @@
|
||||
#
|
||||
# Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
# contributor license agreements. See the NOTICE file distributed with
|
||||
# this work for additional information regarding copyright ownership.
|
||||
# The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
# (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
labels:
|
||||
{{- include "apisix-ingress-controller-manager.labels" . | nindent 4 }}
|
||||
name: {{ include "apisix-ingress-controller-manager.name.fullname" . }}
|
||||
namespace: {{ .Release.Namespace }}
|
||||
spec:
|
||||
ports:
|
||||
- name: metrics
|
||||
port: 8080
|
||||
protocol: TCP
|
||||
targetPort: metrics
|
||||
selector:
|
||||
{{- include "apisix-ingress-controller-manager.selectorLabels" . | nindent 4 }}
|
||||
+48
@@ -0,0 +1,48 @@
|
||||
#
|
||||
# Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
# contributor license agreements. See the NOTICE file distributed with
|
||||
# this work for additional information regarding copyright ownership.
|
||||
# The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
# (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
{{- if .Values.serviceMonitor.enabled }}
|
||||
apiVersion: monitoring.coreos.com/v1
|
||||
kind: ServiceMonitor
|
||||
metadata:
|
||||
name: {{ include "apisix-ingress-controller-manager.name.fullname" . }}
|
||||
{{- if .Values.serviceMonitor.namespace }}
|
||||
namespace: {{ .Values.serviceMonitor.namespace }}
|
||||
{{- end }}
|
||||
{{- if .Values.serviceMonitor.labels }}
|
||||
labels: {{- toYaml .Values.serviceMonitor.labels | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- if .Values.serviceMonitor.annotations }}
|
||||
annotations: {{- toYaml .Values.serviceMonitor.annotations | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
endpoints:
|
||||
- targetPort: metrics
|
||||
scheme: http
|
||||
{{- if .Values.serviceMonitor.interval }}
|
||||
interval: {{ .Values.serviceMonitor.interval }}
|
||||
{{- end }}
|
||||
{{- with .Values.serviceMonitor.metricRelabelings }}
|
||||
metricRelabelings: {{ toYaml . | nindent 6 }}
|
||||
{{- end }}
|
||||
namespaceSelector:
|
||||
matchNames:
|
||||
- {{ .Release.Namespace }}
|
||||
|
||||
selector:
|
||||
matchLabels:
|
||||
{{- include "apisix-ingress-controller-manager.labels" . | nindent 6 }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,342 @@
|
||||
#
|
||||
# Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
# contributor license agreements. See the NOTICE file distributed with
|
||||
# this work for additional information regarding copyright ownership.
|
||||
# The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
# (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
{{- if .Values.webhook.enabled }}
|
||||
{{- $certCert := "" -}}
|
||||
{{- $certKey := "" -}}
|
||||
{{- $caCert := "" -}}
|
||||
{{- if not .Values.webhook.certificate.provided }}
|
||||
{{- $cn := printf "%s.%s.svc" (include "apisix-ingress-controller-manager.webhook.serviceName" .) .Release.Namespace -}}
|
||||
{{- $ca := genCA "apisix-ingress-webhook-ca" 3650 -}}
|
||||
{{- $cert := genSignedCert $cn nil (list $cn) 3650 $ca -}}
|
||||
{{- $certCert = $cert.Cert -}}
|
||||
{{- $certKey = $cert.Key -}}
|
||||
{{- $caCert = $ca.Cert -}}
|
||||
|
||||
{{- $certSecret := (lookup "v1" "Secret" .Release.Namespace (include "apisix-ingress-controller-manager.webhook.secretName" .)) -}}
|
||||
{{- if $certSecret }}
|
||||
{{- $certCert = (b64dec (get $certSecret.data "tls.crt")) -}}
|
||||
{{- $certKey = (b64dec (get $certSecret.data "tls.key")) -}}
|
||||
{{- $caCert = (b64dec (get $certSecret.data "ca.crt")) -}}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
---
|
||||
apiVersion: admissionregistration.k8s.io/v1
|
||||
kind: ValidatingWebhookConfiguration
|
||||
metadata:
|
||||
name: {{ include "apisix-ingress-controller-manager.name.fullname" . }}-webhook
|
||||
labels:
|
||||
{{- include "apisix-ingress-controller-manager.labels" . | nindent 4 }}
|
||||
webhooks:
|
||||
- name: vapisixroute-v2.kb.io
|
||||
admissionReviewVersions: ["v1"]
|
||||
clientConfig:
|
||||
{{- if not .Values.webhook.certificate.provided }}
|
||||
caBundle: {{ b64enc $caCert }}
|
||||
{{- else }}
|
||||
caBundle: {{ .Values.webhook.certificate.caBundle }}
|
||||
{{- end }}
|
||||
service:
|
||||
name: {{ include "apisix-ingress-controller-manager.webhook.serviceName" . }}
|
||||
namespace: {{ .Release.Namespace }}
|
||||
path: /validate-apisix-apache-org-v2-apisixroute
|
||||
failurePolicy: {{ .Values.webhook.failurePolicy }}
|
||||
{{- with .Values.webhook.timeoutSeconds }}
|
||||
timeoutSeconds: {{ . }}
|
||||
{{- end }}
|
||||
sideEffects: None
|
||||
rules:
|
||||
- operations: ["CREATE", "UPDATE"]
|
||||
apiGroups: ["apisix.apache.org"]
|
||||
apiVersions: ["v2"]
|
||||
resources: ["apisixroutes"]
|
||||
- name: vapisixconsumer-v2.kb.io
|
||||
admissionReviewVersions: ["v1"]
|
||||
clientConfig:
|
||||
{{- if not .Values.webhook.certificate.provided }}
|
||||
caBundle: {{ b64enc $caCert }}
|
||||
{{- else }}
|
||||
caBundle: {{ .Values.webhook.certificate.caBundle }}
|
||||
{{- end }}
|
||||
service:
|
||||
name: {{ include "apisix-ingress-controller-manager.webhook.serviceName" . }}
|
||||
namespace: {{ .Release.Namespace }}
|
||||
path: /validate-apisix-apache-org-v2-apisixconsumer
|
||||
failurePolicy: {{ .Values.webhook.failurePolicy }}
|
||||
{{- with .Values.webhook.timeoutSeconds }}
|
||||
timeoutSeconds: {{ . }}
|
||||
{{- end }}
|
||||
sideEffects: None
|
||||
rules:
|
||||
- operations: ["CREATE", "UPDATE"]
|
||||
apiGroups: ["apisix.apache.org"]
|
||||
apiVersions: ["v2"]
|
||||
resources: ["apisixconsumers"]
|
||||
- name: vapisixtls-v2.kb.io
|
||||
admissionReviewVersions: ["v1"]
|
||||
clientConfig:
|
||||
{{- if not .Values.webhook.certificate.provided }}
|
||||
caBundle: {{ b64enc $caCert }}
|
||||
{{- else }}
|
||||
caBundle: {{ .Values.webhook.certificate.caBundle }}
|
||||
{{- end }}
|
||||
service:
|
||||
name: {{ include "apisix-ingress-controller-manager.webhook.serviceName" . }}
|
||||
namespace: {{ .Release.Namespace }}
|
||||
path: /validate-apisix-apache-org-v2-apisixtls
|
||||
failurePolicy: {{ .Values.webhook.failurePolicy }}
|
||||
{{- with .Values.webhook.timeoutSeconds }}
|
||||
timeoutSeconds: {{ . }}
|
||||
{{- end }}
|
||||
sideEffects: None
|
||||
rules:
|
||||
- operations: ["CREATE", "UPDATE"]
|
||||
apiGroups: ["apisix.apache.org"]
|
||||
apiVersions: ["v2"]
|
||||
resources: ["apisixtlses"]
|
||||
- name: vconsumer-v1alpha1.kb.io
|
||||
admissionReviewVersions: ["v1"]
|
||||
clientConfig:
|
||||
{{- if not .Values.webhook.certificate.provided }}
|
||||
caBundle: {{ b64enc $caCert }}
|
||||
{{- else }}
|
||||
caBundle: {{ .Values.webhook.certificate.caBundle }}
|
||||
{{- end }}
|
||||
service:
|
||||
name: {{ include "apisix-ingress-controller-manager.webhook.serviceName" . }}
|
||||
namespace: {{ .Release.Namespace }}
|
||||
path: /validate-apisix-apache-org-v1alpha1-consumer
|
||||
failurePolicy: {{ .Values.webhook.failurePolicy }}
|
||||
{{- with .Values.webhook.timeoutSeconds }}
|
||||
timeoutSeconds: {{ . }}
|
||||
{{- end }}
|
||||
sideEffects: None
|
||||
rules:
|
||||
- operations: ["CREATE", "UPDATE"]
|
||||
apiGroups: ["apisix.apache.org"]
|
||||
apiVersions: ["v1alpha1"]
|
||||
resources: ["consumers"]
|
||||
- name: vgatewayproxy-v1alpha1.kb.io
|
||||
admissionReviewVersions: ["v1"]
|
||||
clientConfig:
|
||||
{{- if not .Values.webhook.certificate.provided }}
|
||||
caBundle: {{ b64enc $caCert }}
|
||||
{{- else }}
|
||||
caBundle: {{ .Values.webhook.certificate.caBundle }}
|
||||
{{- end }}
|
||||
service:
|
||||
name: {{ include "apisix-ingress-controller-manager.webhook.serviceName" . }}
|
||||
namespace: {{ .Release.Namespace }}
|
||||
path: /validate-apisix-apache-org-v1alpha1-gatewayproxy
|
||||
failurePolicy: {{ .Values.webhook.failurePolicy }}
|
||||
{{- with .Values.webhook.timeoutSeconds }}
|
||||
timeoutSeconds: {{ . }}
|
||||
{{- end }}
|
||||
sideEffects: None
|
||||
rules:
|
||||
- operations: ["CREATE", "UPDATE"]
|
||||
apiGroups: ["apisix.apache.org"]
|
||||
apiVersions: ["v1alpha1"]
|
||||
resources: ["gatewayproxies"]
|
||||
- name: vingress-v1.kb.io
|
||||
admissionReviewVersions: ["v1"]
|
||||
clientConfig:
|
||||
{{- if not .Values.webhook.certificate.provided }}
|
||||
caBundle: {{ b64enc $caCert }}
|
||||
{{- else }}
|
||||
caBundle: {{ .Values.webhook.certificate.caBundle }}
|
||||
{{- end }}
|
||||
service:
|
||||
name: {{ include "apisix-ingress-controller-manager.webhook.serviceName" . }}
|
||||
namespace: {{ .Release.Namespace }}
|
||||
path: /validate-networking-k8s-io-v1-ingress
|
||||
failurePolicy: {{ .Values.webhook.failurePolicy }}
|
||||
{{- with .Values.webhook.timeoutSeconds }}
|
||||
timeoutSeconds: {{ . }}
|
||||
{{- end }}
|
||||
sideEffects: None
|
||||
rules:
|
||||
- operations: ["CREATE", "UPDATE"]
|
||||
apiGroups: ["networking.k8s.io"]
|
||||
apiVersions: ["v1"]
|
||||
resources: ["ingresses"]
|
||||
- name: vingressclass-v1.kb.io
|
||||
admissionReviewVersions: ["v1"]
|
||||
clientConfig:
|
||||
{{- if not .Values.webhook.certificate.provided }}
|
||||
caBundle: {{ b64enc $caCert }}
|
||||
{{- else }}
|
||||
caBundle: {{ .Values.webhook.certificate.caBundle }}
|
||||
{{- end }}
|
||||
service:
|
||||
name: {{ include "apisix-ingress-controller-manager.webhook.serviceName" . }}
|
||||
namespace: {{ .Release.Namespace }}
|
||||
path: /validate-networking-k8s-io-v1-ingressclass
|
||||
failurePolicy: {{ .Values.webhook.failurePolicy }}
|
||||
{{- with .Values.webhook.timeoutSeconds }}
|
||||
timeoutSeconds: {{ . }}
|
||||
{{- end }}
|
||||
sideEffects: None
|
||||
rules:
|
||||
- operations: ["CREATE", "UPDATE"]
|
||||
apiGroups: ["networking.k8s.io"]
|
||||
apiVersions: ["v1"]
|
||||
resources: ["ingressclasses"]
|
||||
- name: vgateway-v1.kb.io
|
||||
admissionReviewVersions: ["v1"]
|
||||
clientConfig:
|
||||
{{- if not .Values.webhook.certificate.provided }}
|
||||
caBundle: {{ b64enc $caCert }}
|
||||
{{- else }}
|
||||
caBundle: {{ .Values.webhook.certificate.caBundle }}
|
||||
{{- end }}
|
||||
service:
|
||||
name: {{ include "apisix-ingress-controller-manager.webhook.serviceName" . }}
|
||||
namespace: {{ .Release.Namespace }}
|
||||
path: /validate-gateway-networking-k8s-io-v1-gateway
|
||||
failurePolicy: {{ .Values.webhook.failurePolicy }}
|
||||
{{- with .Values.webhook.timeoutSeconds }}
|
||||
timeoutSeconds: {{ . }}
|
||||
{{- end }}
|
||||
sideEffects: None
|
||||
rules:
|
||||
- operations: ["CREATE", "UPDATE"]
|
||||
apiGroups: ["gateway.networking.k8s.io"]
|
||||
apiVersions: ["v1"]
|
||||
resources: ["gateways"]
|
||||
- name: vgrpcroute-v1.kb.io
|
||||
admissionReviewVersions: ["v1"]
|
||||
clientConfig:
|
||||
{{- if not .Values.webhook.certificate.provided }}
|
||||
caBundle: {{ b64enc $caCert }}
|
||||
{{- else }}
|
||||
caBundle: {{ .Values.webhook.certificate.caBundle }}
|
||||
{{- end }}
|
||||
service:
|
||||
name: {{ include "apisix-ingress-controller-manager.webhook.serviceName" . }}
|
||||
namespace: {{ .Release.Namespace }}
|
||||
path: /validate-gateway-networking-k8s-io-v1-grpcroute
|
||||
failurePolicy: {{ .Values.webhook.failurePolicy }}
|
||||
{{- with .Values.webhook.timeoutSeconds }}
|
||||
timeoutSeconds: {{ . }}
|
||||
{{- end }}
|
||||
sideEffects: None
|
||||
rules:
|
||||
- operations: ["CREATE", "UPDATE"]
|
||||
apiGroups: ["gateway.networking.k8s.io"]
|
||||
apiVersions: ["v1"]
|
||||
resources: ["grpcroutes"]
|
||||
- name: vhttproute-v1.kb.io
|
||||
admissionReviewVersions: ["v1"]
|
||||
clientConfig:
|
||||
{{- if not .Values.webhook.certificate.provided }}
|
||||
caBundle: {{ b64enc $caCert }}
|
||||
{{- else }}
|
||||
caBundle: {{ .Values.webhook.certificate.caBundle }}
|
||||
{{- end }}
|
||||
service:
|
||||
name: {{ include "apisix-ingress-controller-manager.webhook.serviceName" . }}
|
||||
namespace: {{ .Release.Namespace }}
|
||||
path: /validate-gateway-networking-k8s-io-v1-httproute
|
||||
failurePolicy: {{ .Values.webhook.failurePolicy }}
|
||||
{{- with .Values.webhook.timeoutSeconds }}
|
||||
timeoutSeconds: {{ . }}
|
||||
{{- end }}
|
||||
sideEffects: None
|
||||
rules:
|
||||
- operations: ["CREATE", "UPDATE"]
|
||||
apiGroups: ["gateway.networking.k8s.io"]
|
||||
apiVersions: ["v1"]
|
||||
resources: ["httproutes"]
|
||||
- name: vtcproute-v1alpha2.kb.io
|
||||
admissionReviewVersions: ["v1"]
|
||||
clientConfig:
|
||||
{{- if not .Values.webhook.certificate.provided }}
|
||||
caBundle: {{ b64enc $caCert }}
|
||||
{{- else }}
|
||||
caBundle: {{ .Values.webhook.certificate.caBundle }}
|
||||
{{- end }}
|
||||
service:
|
||||
name: {{ include "apisix-ingress-controller-manager.webhook.serviceName" . }}
|
||||
namespace: {{ .Release.Namespace }}
|
||||
path: /validate-gateway-networking-k8s-io-v1alpha2-tcproute
|
||||
failurePolicy: {{ .Values.webhook.failurePolicy }}
|
||||
{{- with .Values.webhook.timeoutSeconds }}
|
||||
timeoutSeconds: {{ . }}
|
||||
{{- end }}
|
||||
sideEffects: None
|
||||
rules:
|
||||
- operations: ["CREATE", "UPDATE"]
|
||||
apiGroups: ["gateway.networking.k8s.io"]
|
||||
apiVersions: ["v1alpha2"]
|
||||
resources: ["tcproutes"]
|
||||
- name: vudproute-v1alpha2.kb.io
|
||||
admissionReviewVersions: ["v1"]
|
||||
clientConfig:
|
||||
{{- if not .Values.webhook.certificate.provided }}
|
||||
caBundle: {{ b64enc $caCert }}
|
||||
{{- else }}
|
||||
caBundle: {{ .Values.webhook.certificate.caBundle }}
|
||||
{{- end }}
|
||||
service:
|
||||
name: {{ include "apisix-ingress-controller-manager.webhook.serviceName" . }}
|
||||
namespace: {{ .Release.Namespace }}
|
||||
path: /validate-gateway-networking-k8s-io-v1alpha2-udproute
|
||||
failurePolicy: {{ .Values.webhook.failurePolicy }}
|
||||
{{- with .Values.webhook.timeoutSeconds }}
|
||||
timeoutSeconds: {{ . }}
|
||||
{{- end }}
|
||||
sideEffects: None
|
||||
rules:
|
||||
- operations: ["CREATE", "UPDATE"]
|
||||
apiGroups: ["gateway.networking.k8s.io"]
|
||||
apiVersions: ["v1alpha2"]
|
||||
resources: ["udproutes"]
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ include "apisix-ingress-controller-manager.webhook.serviceName" . }}
|
||||
namespace: {{ .Release.Namespace }}
|
||||
labels:
|
||||
{{- include "apisix-ingress-controller-manager.labels" . | nindent 4 }}
|
||||
spec:
|
||||
ports:
|
||||
- name: webhook
|
||||
port: 443
|
||||
protocol: TCP
|
||||
targetPort: webhook
|
||||
selector:
|
||||
{{- include "apisix-ingress-controller-manager.selectorLabels" . | nindent 4 }}
|
||||
|
||||
{{- if not .Values.webhook.certificate.provided }}
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: {{ include "apisix-ingress-controller-manager.webhook.secretName" . }}
|
||||
namespace: {{ .Release.Namespace }}
|
||||
labels:
|
||||
{{- include "apisix-ingress-controller-manager.labels" . | nindent 4 }}
|
||||
type: kubernetes.io/tls
|
||||
data:
|
||||
tls.crt: {{ b64enc $certCert }}
|
||||
tls.key: {{ b64enc $certKey }}
|
||||
ca.crt: {{ b64enc $caCert }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
Reference in New Issue
Block a user