Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
--charts charts/api7 \
--charts charts/gateway \
--charts charts/ingress-controller \
--charts charts/aisix-cloud'
--charts charts/aisix-cp'

- name: Verify Chart.lock files
run: |
Expand Down
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ This repo (`api7/api7-helm-chart`) holds the Helm charts for API7 EE components
| `gateway` (Data Plane) | `charts/gateway` | yes — appVersion is the EE version |
| `api7-ingress-controller` | `charts/ingress-controller` | no — independent product version |
| `developer-portal-fe` | `charts/developer-portal-fe` | no — independent product version |
| `aisix-cloud` (AISIX private-deployment control plane) | `charts/aisix-cloud` | no — independent product version (source of truth: `api7/AISIX-Cloud` `helm/aisix-cloud`) |
| `aisix-cp` (AISIX private-deployment control plane) | `charts/aisix-cp` | no — independent product version (source of truth: `api7/AISIX-Cloud` `helm/aisix-cp`) |

## Multi-line maintenance model

Expand Down
16 changes: 0 additions & 16 deletions charts/aisix-cloud/templates/api-service.yaml

This file was deleted.

16 changes: 0 additions & 16 deletions charts/aisix-cloud/templates/ui-service.yaml

This file was deleted.

File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions charts/aisix-cloud/Chart.yaml → charts/aisix-cp/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v2
name: aisix-cloud
description: Helm chart for AISIX-Cloud control plane (cp-api, dp-manager, dashboard)
name: aisix-cp
description: Helm chart for AISIX control plane (cp-api, dp-manager, dashboard)
type: application
version: 0.1.0
appVersion: "0.1.0"
Expand Down
10 changes: 5 additions & 5 deletions charts/aisix-cloud/README.md → charts/aisix-cp/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# aisix-cloud
# aisix-cp

![Version: 0.1.0](https://img.shields.io/badge/Version-0.1.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.1.0](https://img.shields.io/badge/AppVersion-0.1.0-informational?style=flat-square)

Helm chart for AISIX-Cloud control plane (cp-api, dp-manager, dashboard)
Helm chart for AISIX control plane (cp-api, dp-manager, dashboard)

## Maintainers

Expand All @@ -25,7 +25,7 @@ Helm chart for AISIX-Cloud control plane (cp-api, dp-manager, dashboard)
| api.dpmgrBaseURL | string | `""` | |
| api.extraEnvVars | list | `[]` | |
| api.image.pullPolicy | string | `"IfNotPresent"` | |
| api.image.repository | string | `"ghcr.io/api7/aisix-cp-api"` | |
| api.image.repository | string | `"docker.io/api7/aisix-cp-api"` | |
| api.image.tag | string | `""` | |
| api.nodeSelector | object | `{}` | |
| api.oauthEnabled | bool | `false` | |
Expand All @@ -49,7 +49,7 @@ Helm chart for AISIX-Cloud control plane (cp-api, dp-manager, dashboard)
| dpm.affinity | object | `{}` | |
| dpm.extraEnvVars | list | `[]` | |
| dpm.image.pullPolicy | string | `"IfNotPresent"` | |
| dpm.image.repository | string | `"ghcr.io/api7/aisix-cp-dpm"` | |
| dpm.image.repository | string | `"docker.io/api7/aisix-cp-dpm"` | |
| dpm.image.tag | string | `""` | |
| dpm.nodeSelector | object | `{}` | |
| dpm.podSecurityContext.fsGroup | int | `101` | |
Expand Down Expand Up @@ -101,7 +101,7 @@ Helm chart for AISIX-Cloud control plane (cp-api, dp-manager, dashboard)
| ui.defaultLocale | string | `"en"` | |
| ui.extraEnvVars | list | `[]` | |
| ui.image.pullPolicy | string | `"IfNotPresent"` | |
| ui.image.repository | string | `"ghcr.io/api7/aisix-cp-ui"` | |
| ui.image.repository | string | `"docker.io/api7/aisix-cp-ui"` | |
| ui.image.tag | string | `""` | |
| ui.nodeSelector | object | `{}` | |
| ui.podSecurityContext.fsGroup | int | `65533` | |
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
AISIX-Cloud control plane has been deployed.
AISIX control plane has been deployed.

Components:
- cp-api: {{ include "aisix-cloud.fullname" . }}-api:{{ .Values.api.service.port }}
- dp-manager: {{ include "aisix-cloud.fullname" . }}-dpm:{{ .Values.dpm.service.port }}
- dashboard: {{ include "aisix-cloud.fullname" . }}-ui:{{ .Values.ui.service.port }}
- PostgreSQL: {{ include "aisix-cloud.pgHost" . }}:{{ include "aisix-cloud.pgPort" . }}
- cp-api: {{ include "aisix-cp.fullname" . }}-api:{{ .Values.api.service.port }}
- dp-manager: {{ include "aisix-cp.fullname" . }}-dpm:{{ .Values.dpm.service.port }}
- dashboard: {{ include "aisix-cp.fullname" . }}-ui:{{ .Values.ui.service.port }}
- PostgreSQL: {{ include "aisix-cp.pgHost" . }}:{{ include "aisix-cp.pgPort" . }}

Access the dashboard via cp-api (reverse proxy):
kubectl port-forward svc/{{ include "aisix-cloud.fullname" . }}-api {{ .Values.api.service.port }}:{{ .Values.api.service.port }} -n {{ .Release.Namespace }}
kubectl port-forward svc/{{ include "aisix-cp.fullname" . }}-api {{ .Values.api.service.port }}:{{ .Values.api.service.port }} -n {{ .Release.Namespace }}
Then open http://localhost:{{ .Values.api.service.port }}

Connect a data-plane (managed mode):
Expand All @@ -17,7 +17,7 @@ Connect a data-plane (managed mode):
NodePort: {{ .Values.dpm.service.nodePort }}
{{- else }}
Get the assigned port:
kubectl get svc/{{ include "aisix-cloud.fullname" . }}-dpm -n {{ .Release.Namespace }} -o jsonpath='{.spec.ports[0].nodePort}'
kubectl get svc/{{ include "aisix-cp.fullname" . }}-dpm -n {{ .Release.Namespace }} -o jsonpath='{.spec.ports[0].nodePort}'
{{- end }}

Run the DP container (replace <node-ip> and <node-port> with actual values):
Expand All @@ -30,8 +30,8 @@ Connect a data-plane (managed mode):
-e AISIX_MANAGED__CP_KEY_PEM='<client-key-pem>' \
-e AISIX_MANAGED__CP_CA_PEM='<ca-cert-pem>' \
-v aisix-mtls:/var/lib/aisix \
{{ .Values.api.dpImage | default (printf "ghcr.io/api7/aisix:%s" .Chart.AppVersion) }}
{{ .Values.api.dpImage | default (printf "docker.io/api7/aisix:%s" .Chart.AppVersion) }}
{{- else }}
DPM is a ClusterIP service. Expose it via Ingress, LoadBalancer, or port-forward:
kubectl port-forward svc/{{ include "aisix-cloud.fullname" . }}-dpm {{ .Values.dpm.service.port }}:{{ .Values.dpm.service.port }} -n {{ .Release.Namespace }}
kubectl port-forward svc/{{ include "aisix-cp.fullname" . }}-dpm {{ .Values.dpm.service.port }}:{{ .Values.dpm.service.port }} -n {{ .Release.Namespace }}
{{- end }}
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{{/*
Expand the name of the chart.
*/}}
{{- define "aisix-cloud.name" -}}
{{- define "aisix-cp.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
{{- end }}

{{/*
Create a default fully qualified app name.
*/}}
{{- define "aisix-cloud.fullname" -}}
{{- define "aisix-cp.fullname" -}}
{{- if .Values.fullnameOverride }}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
{{- else }}
Expand All @@ -24,33 +24,33 @@ Create a default fully qualified app name.
{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "aisix-cloud.chart" -}}
{{- define "aisix-cp.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
{{- end }}

{{/*
Common labels
*/}}
{{- define "aisix-cloud.labels" -}}
helm.sh/chart: {{ include "aisix-cloud.chart" . }}
{{- define "aisix-cp.labels" -}}
helm.sh/chart: {{ include "aisix-cp.chart" . }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
app.kubernetes.io/part-of: aisix-cloud
app.kubernetes.io/part-of: aisix-cp
{{- end }}

{{/*
Selector labels for a component.
Usage: {{ include "aisix-cloud.selectorLabels" (dict "root" . "component" "api") }}
Usage: {{ include "aisix-cp.selectorLabels" (dict "root" . "component" "api") }}
*/}}
{{- define "aisix-cloud.selectorLabels" -}}
app.kubernetes.io/name: {{ include "aisix-cloud.name" .root }}
{{- define "aisix-cp.selectorLabels" -}}
app.kubernetes.io/name: {{ include "aisix-cp.name" .root }}
app.kubernetes.io/instance: {{ .root.Release.Name }}
app.kubernetes.io/component: {{ .component }}
{{- end }}

{{/*
PostgreSQL host — uses builtin subchart service name or external host.
*/}}
{{- define "aisix-cloud.pgHost" -}}
{{- define "aisix-cp.pgHost" -}}
{{- if .Values.postgresql.builtin }}
{{- if .Values.postgresql.fullnameOverride }}
{{- .Values.postgresql.fullnameOverride }}
Expand All @@ -65,7 +65,7 @@ PostgreSQL host — uses builtin subchart service name or external host.
{{/*
PostgreSQL port.
*/}}
{{- define "aisix-cloud.pgPort" -}}
{{- define "aisix-cp.pgPort" -}}
{{- if .Values.postgresql.builtin }}
{{- .Values.postgresql.primary.service.ports.postgresql }}
{{- else }}
Expand All @@ -76,7 +76,7 @@ PostgreSQL port.
{{/*
PostgreSQL username.
*/}}
{{- define "aisix-cloud.pgUser" -}}
{{- define "aisix-cp.pgUser" -}}
{{- if .Values.postgresql.builtin }}
{{- if .Values.postgresql.auth.usePostgresUserForAppConnections }}
{{- "postgres" }}
Expand All @@ -91,7 +91,7 @@ PostgreSQL username.
{{/*
PostgreSQL database name.
*/}}
{{- define "aisix-cloud.pgDatabase" -}}
{{- define "aisix-cp.pgDatabase" -}}
{{- if .Values.postgresql.builtin }}
{{- .Values.postgresql.auth.database }}
{{- else }}
Expand All @@ -102,7 +102,7 @@ PostgreSQL database name.
{{/*
PostgreSQL SSL mode.
*/}}
{{- define "aisix-cloud.pgSSLMode" -}}
{{- define "aisix-cp.pgSSLMode" -}}
{{- if .Values.postgresql.builtin }}
{{- "disable" }}
{{- else }}
Expand All @@ -114,21 +114,21 @@ PostgreSQL SSL mode.
Database URL constructed from postgresql config.
Uses $(PGPASSWORD) env var substitution for runtime secret injection.
*/}}
{{- define "aisix-cloud.databaseURL" -}}
postgres://{{ include "aisix-cloud.pgUser" . }}:$(PGPASSWORD)@{{ include "aisix-cloud.pgHost" . }}:{{ include "aisix-cloud.pgPort" . }}/{{ include "aisix-cloud.pgDatabase" . }}?sslmode={{ include "aisix-cloud.pgSSLMode" . }}
{{- define "aisix-cp.databaseURL" -}}
postgres://{{ include "aisix-cp.pgUser" . }}:$(PGPASSWORD)@{{ include "aisix-cp.pgHost" . }}:{{ include "aisix-cp.pgPort" . }}/{{ include "aisix-cp.pgDatabase" . }}?sslmode={{ include "aisix-cp.pgSSLMode" . }}
{{- end }}

{{/*
Secret name for aisix-cloud secrets.
Secret name for aisix-cp secrets.
*/}}
{{- define "aisix-cloud.secretName" -}}
{{ include "aisix-cloud.fullname" . }}-secrets
{{- define "aisix-cp.secretName" -}}
{{ include "aisix-cp.fullname" . }}-secrets
{{- end }}

{{/*
Name of the Secret containing the PostgreSQL password.
*/}}
{{- define "aisix-cloud.pgSecretName" -}}
{{- define "aisix-cp.pgSecretName" -}}
{{- if .Values.postgresql.builtin }}
{{- if .Values.postgresql.auth.existingSecret }}
{{- .Values.postgresql.auth.existingSecret }}
Expand All @@ -140,14 +140,14 @@ Name of the Secret containing the PostgreSQL password.
{{- else if .Values.externalDatabase.existingSecret }}
{{- .Values.externalDatabase.existingSecret }}
{{- else }}
{{- printf "%s-external-db" (include "aisix-cloud.fullname" .) }}
{{- printf "%s-external-db" (include "aisix-cp.fullname" .) }}
{{- end }}
{{- end }}

{{/*
Secret key containing the PostgreSQL password for application connections.
*/}}
{{- define "aisix-cloud.pgPasswordSecretKey" -}}
{{- define "aisix-cp.pgPasswordSecretKey" -}}
{{- if and .Values.postgresql.builtin .Values.postgresql.auth.usePostgresUserForAppConnections }}
{{- "postgres-password" }}
{{- else }}
Expand All @@ -158,9 +158,9 @@ Secret key containing the PostgreSQL password for application connections.
{{/*
ServiceAccount name.
*/}}
{{- define "aisix-cloud.serviceAccountName" -}}
{{- define "aisix-cp.serviceAccountName" -}}
{{- if .Values.serviceAccount.create }}
{{- default (include "aisix-cloud.fullname" .) .Values.serviceAccount.name }}
{{- default (include "aisix-cp.fullname" .) .Values.serviceAccount.name }}
{{- else }}
{{- default "default" .Values.serviceAccount.name }}
{{- end }}
Expand All @@ -169,7 +169,7 @@ ServiceAccount name.
{{/*
Image pull secrets from global config.
*/}}
{{- define "aisix-cloud.imagePullSecrets" -}}
{{- define "aisix-cp.imagePullSecrets" -}}
{{- with .Values.global.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 2 }}
Expand All @@ -180,21 +180,21 @@ imagePullSecrets:
Init container that blocks until PostgreSQL accepts connections.
Reuses the same PG image shipped by the chart so no extra pull is needed.
*/}}
{{- define "aisix-cloud.pgWaitInitContainer" -}}
{{- define "aisix-cp.pgWaitInitContainer" -}}
- name: wait-for-pg
image: "{{ .Values.postgresql.image.registry }}/{{ .Values.postgresql.image.repository }}:{{ .Values.postgresql.image.tag }}"
imagePullPolicy: IfNotPresent
env:
- name: PGPASSWORD
valueFrom:
secretKeyRef:
name: {{ include "aisix-cloud.pgSecretName" . }}
key: {{ include "aisix-cloud.pgPasswordSecretKey" . }}
name: {{ include "aisix-cp.pgSecretName" . }}
key: {{ include "aisix-cp.pgPasswordSecretKey" . }}
command:
- sh
- -c
- |
until pg_isready -h {{ include "aisix-cloud.pgHost" . }} -p {{ include "aisix-cloud.pgPort" . }} -U {{ include "aisix-cloud.pgUser" . }}; do
until pg_isready -h {{ include "aisix-cp.pgHost" . }} -p {{ include "aisix-cp.pgPort" . }} -U {{ include "aisix-cp.pgUser" . }}; do
echo "waiting for postgresql..."
sleep 2
done
Expand Down
Loading
Loading