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:
wbsong111
2026-08-06 09:42:24 +09:00
parent 9d5a10b09c
commit 16321b52c7
1262 changed files with 314285 additions and 0 deletions
@@ -0,0 +1,23 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*.orig
*~
# Various IDEs
.project
.idea/
*.tmproj
.vscode/
@@ -0,0 +1,18 @@
annotations:
artifacthub.io/prerelease: "true"
apiVersion: v2
appVersion: 2.1.0
description: Apache APISIX Ingress Controller for Kubernetes
icon: https://apache.org/logos/res/apisix/apisix.png
keywords:
- ingress
- apisix
- nginx
- crd
maintainers:
- name: tao12345666333
name: apisix-ingress-controller
sources:
- https://github.com/apache/apisix-helm-chart
type: application
version: 1.2.0
@@ -0,0 +1,176 @@
# Apache APISIX ingress controller
[APISIX Ingress controller](https://github.com/apache/apisix-ingress-controller/) for Kubernetes using Apache APISIX as a high performance reverse proxy and load balancer.
If you have installed multiple ingress controller, add the `kubernetes.io/ingress.class: apisix` annotation to your Ingress resources.
This chart bootstraps an apisix-ingress-controller deployment on a [Kubernetes](http://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager.
## Prerequisites
Apisix ingress controller requires Kubernetes version 1.16+.
## Get Repo Info
```console
helm repo add apisix https://apache.github.io/apisix-helm-chart
helm repo update
```
## Install Chart
**Important:** only helm3 is supported
```console
helm install [RELEASE_NAME] apisix/apisix-ingress-controller --namespace ingress-apisix --create-namespace
```
The command deploys apisix-ingress-controller on the Kubernetes cluster in the default configuration.
_See [configuration](#configuration) below._
_See [helm install](https://helm.sh/docs/helm/helm_install/) for command documentation._
## Uninstall Chart
```console
helm uninstall [RELEASE_NAME] --namespace ingress-apisix
```
This removes all the Kubernetes components associated with the chart and deletes the release.
_See [helm uninstall](https://helm.sh/docs/helm/helm_uninstall/) for command documentation._
## Upgrading Chart
```console
helm upgrade [RELEASE_NAME] [CHART] --install
```
_See [helm upgrade](https://helm.sh/docs/helm/helm_upgrade/) for command documentation._
## Configuration
See [Customizing the Chart Before Installing](https://helm.sh/docs/intro/using_helm/#customizing-the-chart-before-installing). To see all configurable options with detailed comments, visit the chart's [values.yaml](./values.yaml), or run these configuration commands:
```console
helm show values apisix/apisix-ingress-controller
```
### Pod priority
`priorityClassName` field referenced a name of a created `PriorityClass` object. Check [here](https://kubernetes.io/docs/concepts/scheduling-eviction/pod-priority-preemption) for more details.
### Security context
A security context provides us with a way to define privilege and access control for a Pod or even at the container level.
Check [here](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#securitycontext-v1-core) to see the SecurityContext resource with more detail.
Check also [here](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/) to see a full explanation and some examples to configure the security context.
Right below you have an example of the security context configuration. In this case, we define that all the processes in the container will run with user ID 1000.
```yaml
...
spec:
securityContext:
runAsUser: 1000
runAsGroup: 3000
...
```
The same for the group definition, where we define the primary group of 3000 for all processes.
**It's quite important to know, if the `runAsGroup` is omited, the primary group will be root(0)**, which in some cases goes against some security policies.
To define this configuration at the **pod level**, you need to set:
```yaml
--set podSecurityContext.runAsUser=«VALUE»
--set podSecurityContext.runAsGroup=«VALUE»
...
```
The same for container level, you need to set:
```yaml
--set securityContext.runAsUser=«VALUE»
--set SecurityContext.runAsGroup=«VALUE»
...
```
## Values
| Key | Type | Default | Description |
|-----|------|---------|-------------|
| apisix.adminService.name | string | `"apisix-admin"` | |
| apisix.adminService.namespace | string | `"apisix-ingress"` | |
| apisix.adminService.port | int | `9180` | |
| autoscaling.enabled | bool | `false` | |
| autoscaling.minReplicas | int | `1` | |
| config.controllerName | string | `"apisix.apache.org/apisix-ingress-controller"` | |
| config.disableGatewayAPI | bool | `false` | |
| config.enableHTTP2 | bool | `false` | |
| config.execADCTimeout | string | `"15s"` | |
| config.kubernetes.defaultIngressClass | bool | `false` | |
| config.kubernetes.ingressClass | string | `"apisix"` | |
| config.leaderElection.disable | bool | `false` | |
| config.leaderElection.id | string | `"apisix-ingress-controller-leader"` | |
| config.leaderElection.leaseDuration | string | `"15s"` | |
| config.leaderElection.renewDeadline | string | `"10s"` | |
| config.leaderElection.retryPeriod | string | `"2s"` | |
| config.listenerPortMatchMode | string | `"auto"` | |
| config.logLevel | string | `"info"` | |
| config.metricsAddr | string | `":8080"` | |
| config.probeAddr | string | `":8081"` | |
| config.provider.initSyncDelay | string | `"20m"` | |
| config.provider.syncPeriod | string | `"1m"` | |
| config.provider.type | string | `"apisix"` | |
| config.secureMetrics | bool | `false` | |
| deployment.adcContainer | object | `{"config":{"logLevel":"info"},"image":{"repository":"ghcr.io/api7/adc","tag":"0.26.0"}}` | Set adc sidecar container configuration |
| deployment.affinity | object | `{}` | |
| deployment.annotations | object | `{}` | Add annotations to Apache APISIX ingress controller resource |
| deployment.image.pullPolicy | string | `"IfNotPresent"` | |
| deployment.image.repository | string | `"apache/apisix-ingress-controller"` | |
| deployment.image.tag | string | `"2.1.0"` | |
| deployment.imagePullSecrets | list | `[]` | |
| deployment.nodeSelector | object | `{}` | |
| deployment.podAnnotations | object | `{}` | |
| deployment.podSecurityContext | object | `{"fsGroup":2000}` | Set security context for the pod fsGroup: 2000 ensures containers can share Unix socket files via a common group. |
| deployment.replicas | int | `1` | |
| deployment.resources | object | `{}` | Set pod resource requests & limits |
| deployment.tolerations | list | `[]` | |
| deployment.topologySpreadConstraints | list | `[]` | Topology Spread Constraints for pod assignment spread across your cluster among failure-domains ref: https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/#spread-constraints-for-pods |
| fullnameOverride | string | `""` | |
| gatewayProxy.createDefault | bool | `false` | Controls whether to create a default GatewayProxy custom resource. |
| gatewayProxy.provider | object | `{"controlPlane":{"auth":{"adminKey":{"value":"edd1c9f034335f136f87ad84b625c8f1","valueFrom":{}},"type":"AdminKey"},"endpoints":[],"service":{"name":"","port":9180}},"pluginMetadata":{},"plugins":[],"type":"ControlPlane"}` | Configuration for the GatewayProxy provider connection |
| gatewayProxy.provider.controlPlane | object | `{"auth":{"adminKey":{"value":"edd1c9f034335f136f87ad84b625c8f1","valueFrom":{}},"type":"AdminKey"},"endpoints":[],"service":{"name":"","port":9180}}` | ControlPlane provider specific configuration Either `endpoints` or `service` must be specified, but not both. |
| gatewayProxy.provider.controlPlane.auth | object | `{"adminKey":{"value":"edd1c9f034335f136f87ad84b625c8f1","valueFrom":{}},"type":"AdminKey"}` | Authentication configuration for control plane connection |
| gatewayProxy.provider.controlPlane.auth.adminKey | object | `{"value":"edd1c9f034335f136f87ad84b625c8f1","valueFrom":{}}` | AdminKey authentication configuration. Either `value` or `valueFrom` must be specified, but not both. |
| gatewayProxy.provider.controlPlane.auth.adminKey.value | string | `"edd1c9f034335f136f87ad84b625c8f1"` | The admin key value for authentication. |
| gatewayProxy.provider.controlPlane.auth.adminKey.valueFrom | object | `{}` | Reference to admin key stored in a Kubernetes Secret |
| gatewayProxy.provider.controlPlane.auth.type | string | `AdminKey` | Authentication type. Only `AdminKey` is currently supported. |
| gatewayProxy.provider.controlPlane.endpoints | list | `[]` | List of APISIX control plane Admin API endpoints. example: ["http://apisix-admin.default.svc.cluster.local:9180"] |
| gatewayProxy.provider.controlPlane.service | object | `{"name":"","port":9180}` | Alternatively, reference a Kubernetes Service for the APISIX Admin API. |
| gatewayProxy.provider.pluginMetadata | object | `{}` | Global plugin metadata shared by all instances of the same plugin. |
| gatewayProxy.provider.plugins | list | `[]` | List of global plugins to be enabled on the GatewayProxy. |
| gatewayProxy.provider.type | string | `"ControlPlane"` | Specifies the provider type for the GatewayProxy. |
| labelsOverride | object | `{}` | Override default labels assigned to Apache APISIX ingress controller resource |
| nameOverride | string | `""` | Default values for apisix-ingress-controller. This is a YAML-formatted file. Declare variables to be passed into your templates. |
| podDisruptionBudget | object | `{"enabled":false,"maxUnavailable":1,"minAvailable":"90%"}` | See https://kubernetes.io/docs/tasks/run-application/configure-pdb/ for more details |
| podDisruptionBudget.enabled | bool | `false` | Enable or disable podDisruptionBudget |
| podDisruptionBudget.maxUnavailable | int | `1` | Set the maxUnavailable of podDisruptionBudget |
| podDisruptionBudget.minAvailable | string | `"90%"` | Set the `minAvailable` of podDisruptionBudget. You can specify only one of `maxUnavailable` and `minAvailable` in a single PodDisruptionBudget. See [Specifying a Disruption Budget for your Application](https://kubernetes.io/docs/tasks/run-application/configure-pdb/#specifying-a-poddisruptionbudget) for more details |
| serviceMonitor.annotations | object | `{}` | @param serviceMonitor.annotations ServiceMonitor annotations |
| serviceMonitor.enabled | bool | `false` | Enable or disable ServiceMonitor |
| serviceMonitor.interval | string | `"15s"` | @param serviceMonitor.interval Interval at which metrics should be scraped |
| serviceMonitor.labels | object | `{}` | @param serviceMonitor.labels ServiceMonitor extra labels |
| serviceMonitor.metricRelabelings | object | `{}` | @param serviceMonitor.metricRelabelings MetricRelabelConfigs to apply to samples before ingestion. ref: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#metric_relabel_configs |
| serviceMonitor.namespace | string | `"monitoring"` | @param serviceMonitor.namespace Namespace in which to create the ServiceMonitor |
| webhook.certificate.provided | bool | `false` | Set to true if you want to provide your own certificate |
| webhook.enabled | bool | `true` | Enable or disable admission webhook |
| webhook.failurePolicy | string | `"Ignore"` | Failure policy for the webhook (Fail or Ignore) |
| webhook.port | int | `9443` | The port for the webhook server to listen on |
| webhook.timeoutSeconds | int | `10` | Timeout in seconds for the webhook |
@@ -0,0 +1,104 @@
# Apache APISIX ingress controller
[APISIX Ingress controller](https://github.com/apache/apisix-ingress-controller/) for Kubernetes using Apache APISIX as a high performance reverse proxy and load balancer.
If you have installed multiple ingress controller, add the `kubernetes.io/ingress.class: apisix` annotation to your Ingress resources.
This chart bootstraps an apisix-ingress-controller deployment on a [Kubernetes](http://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager.
## Prerequisites
Apisix ingress controller requires Kubernetes version 1.16+.
## Get Repo Info
```console
helm repo add apisix https://apache.github.io/apisix-helm-chart
helm repo update
```
## Install Chart
**Important:** only helm3 is supported
```console
helm install [RELEASE_NAME] apisix/apisix-ingress-controller --namespace ingress-apisix --create-namespace
```
The command deploys apisix-ingress-controller on the Kubernetes cluster in the default configuration.
_See [configuration](#configuration) below._
_See [helm install](https://helm.sh/docs/helm/helm_install/) for command documentation._
## Uninstall Chart
```console
helm uninstall [RELEASE_NAME] --namespace ingress-apisix
```
This removes all the Kubernetes components associated with the chart and deletes the release.
_See [helm uninstall](https://helm.sh/docs/helm/helm_uninstall/) for command documentation._
## Upgrading Chart
```console
helm upgrade [RELEASE_NAME] [CHART] --install
```
_See [helm upgrade](https://helm.sh/docs/helm/helm_upgrade/) for command documentation._
## Configuration
See [Customizing the Chart Before Installing](https://helm.sh/docs/intro/using_helm/#customizing-the-chart-before-installing). To see all configurable options with detailed comments, visit the chart's [values.yaml](./values.yaml), or run these configuration commands:
```console
helm show values apisix/apisix-ingress-controller
```
### Pod priority
`priorityClassName` field referenced a name of a created `PriorityClass` object. Check [here](https://kubernetes.io/docs/concepts/scheduling-eviction/pod-priority-preemption) for more details.
### Security context
A security context provides us with a way to define privilege and access control for a Pod or even at the container level.
Check [here](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#securitycontext-v1-core) to see the SecurityContext resource with more detail.
Check also [here](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/) to see a full explanation and some examples to configure the security context.
Right below you have an example of the security context configuration. In this case, we define that all the processes in the container will run with user ID 1000.
```yaml
...
spec:
securityContext:
runAsUser: 1000
runAsGroup: 3000
...
```
The same for the group definition, where we define the primary group of 3000 for all processes.
**It's quite important to know, if the `runAsGroup` is omited, the primary group will be root(0)**, which in some cases goes against some security policies.
To define this configuration at the **pod level**, you need to set:
```yaml
--set podSecurityContext.runAsUser=«VALUE»
--set podSecurityContext.runAsGroup=«VALUE»
...
```
The same for container level, you need to set:
```yaml
--set securityContext.runAsUser=«VALUE»
--set SecurityContext.runAsGroup=«VALUE»
...
```
{{ template "chart.valuesSection" . }}
File diff suppressed because it is too large Load Diff
@@ -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 }}
@@ -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
@@ -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 }}
@@ -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 }}
@@ -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
@@ -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 }}
@@ -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
@@ -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 }}
@@ -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 }}
@@ -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 }}
@@ -0,0 +1,202 @@
#
# 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.
#
# -- Default values for apisix-ingress-controller.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
#
nameOverride: ""
fullnameOverride: ""
# -- Override default labels assigned to Apache APISIX ingress controller resource
labelsOverride: {}
# labelsOverride:
# app.kubernetes.io/name: "{{ .Release.Name }}"
# app.kubernetes.io/instance: '{{ include "apisix-ingress-controller.name" . }}'
# -- See https://kubernetes.io/docs/tasks/run-application/configure-pdb/ for more details
podDisruptionBudget:
# -- Enable or disable podDisruptionBudget
enabled: false
# -- Set the `minAvailable` of podDisruptionBudget. You can specify only one of `maxUnavailable` and `minAvailable` in a single PodDisruptionBudget.
# See [Specifying a Disruption Budget for your Application](https://kubernetes.io/docs/tasks/run-application/configure-pdb/#specifying-a-poddisruptionbudget)
# for more details
minAvailable: 90%
# -- Set the maxUnavailable of podDisruptionBudget
maxUnavailable: 1
autoscaling:
enabled: false
minReplicas: 1
deployment:
# -- Add annotations to Apache APISIX ingress controller resource
annotations: {}
podAnnotations: {}
replicas: 1
nodeSelector: {}
tolerations: []
affinity: {}
imagePullSecrets: []
# -- Set security context for the pod
# fsGroup: 2000 ensures containers can share Unix socket files via a common group.
podSecurityContext:
fsGroup: 2000
# -- Topology Spread Constraints for pod assignment spread across your cluster among failure-domains
# ref: https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/#spread-constraints-for-pods
topologySpreadConstraints: []
image:
repository: apache/apisix-ingress-controller
pullPolicy: IfNotPresent
tag: "2.1.0"
# -- Set pod resource requests & limits
resources: {}
# -- Set adc sidecar container configuration
adcContainer:
image:
repository: ghcr.io/api7/adc
tag: "0.26.0"
config:
logLevel: "info"
config:
logLevel: "info"
controllerName: apisix.apache.org/apisix-ingress-controller
leaderElection:
id: "apisix-ingress-controller-leader"
leaseDuration: "15s"
renewDeadline: "10s"
retryPeriod: "2s"
disable: false
metricsAddr: ":8080"
enableHTTP2: false
probeAddr: ":8081"
secureMetrics: false
execADCTimeout: "15s"
disableGatewayAPI: false
listenerPortMatchMode: "auto"
provider:
type: "apisix"
syncPeriod: "1m"
initSyncDelay: "20m"
kubernetes:
ingressClass: apisix
defaultIngressClass: false
# Admission webhook configuration
webhook:
# -- Enable or disable admission webhook
enabled: true
# -- The port for the webhook server to listen on
port: 9443
# -- Failure policy for the webhook (Fail or Ignore)
failurePolicy: Ignore
# -- Timeout in seconds for the webhook
timeoutSeconds: 10
certificate:
# -- Set to true if you want to provide your own certificate
provided: false
# -- Secret name containing the certificate (required if provided is true)
# secretName: "my-webhook-cert"
# -- CA bundle in base64 format (required if provided is true)
# caBundle: ""
# The GatewayProxy resource configures gateway proxy instances including networking,
# provider connection, global plugins, and plugin metadata.
gatewayProxy:
# -- Controls whether to create a default GatewayProxy custom resource.
createDefault: false
# -- Configuration for the GatewayProxy provider connection
provider:
# -- Specifies the provider type for the GatewayProxy.
type: ControlPlane
# -- ControlPlane provider specific configuration
# Either `endpoints` or `service` must be specified, but not both.
controlPlane:
# -- List of APISIX control plane Admin API endpoints.
# example: ["http://apisix-admin.default.svc.cluster.local:9180"]
endpoints: []
# -- Alternatively, reference a Kubernetes Service for the APISIX Admin API.
service:
name: ""
port: 9180
# -- Authentication configuration for control plane connection
auth:
# -- Authentication type. Only `AdminKey` is currently supported.
# @default -- `AdminKey`
type: AdminKey
# -- AdminKey authentication configuration.
# Either `value` or `valueFrom` must be specified, but not both.
adminKey:
# -- The admin key value for authentication.
value: "edd1c9f034335f136f87ad84b625c8f1"
# -- Reference to admin key stored in a Kubernetes Secret
valueFrom: {}
# secretKeyRef:
# name: apisix-admin-secret
# key: admin-key
# -- List of global plugins to be enabled on the GatewayProxy.
plugins: []
# - name: cors
# enabled: true
# config:
# allow_origins: "*"
# allow_methods: "GET,POST,PUT,DELETE"
# - name: ip-restriction
# enabled: false
# config:
# whitelist:
# - 10.0.0.0/8
# - 192.168.0.0/16
# -- Global plugin metadata shared by all instances of the same plugin.
pluginMetadata: {}
# prometheus:
# disable: false
# export_uri: /apisix/prometheus/metrics
apisix:
adminService:
namespace: apisix-ingress
name: apisix-admin
port: 9180
serviceMonitor:
# -- Enable or disable ServiceMonitor
enabled: false
# -- @param serviceMonitor.namespace Namespace in which to create the ServiceMonitor
namespace: "monitoring"
# -- @param serviceMonitor.interval Interval at which metrics should be scraped
interval: 15s
# -- @param serviceMonitor.labels ServiceMonitor extra labels
labels: {}
# -- @param serviceMonitor.annotations ServiceMonitor annotations
annotations: {}
# -- @param serviceMonitor.metricRelabelings MetricRelabelConfigs to apply to samples before ingestion.
# ref: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#metric_relabel_configs
metricRelabelings: {}