diff --git a/charts/apisix/README.md b/charts/apisix/README.md index f39508d3..aa667077 100644 --- a/charts/apisix/README.md +++ b/charts/apisix/README.md @@ -43,8 +43,8 @@ The command removes all the Kubernetes components associated with the chart and | affinity | object | `{}` | Set affinity for Apache APISIX deploy | | apisix.admin.allow.ipList | list | `["127.0.0.1/24"]` | The client IP CIDR allowed to access Apache APISIX Admin API service. | | apisix.admin.cors | bool | `true` | Admin API support CORS response headers | -| apisix.admin.credentials | object | `{"admin":"edd1c9f034335f136f87ad84b625c8f1","secretName":"","viewer":"4054f7cf07e344346cd3f287985e76a2"}` | Admin API credentials | -| apisix.admin.credentials.admin | string | `"edd1c9f034335f136f87ad84b625c8f1"` | Apache APISIX admin API admin role credentials | +| apisix.admin.credentials | object | `{"admin":"","secretName":"","viewer":"4054f7cf07e344346cd3f287985e76a2"}` | Admin API credentials | +| apisix.admin.credentials.admin | string | `""` | Apache APISIX admin API admin role credentials. This is autogenerated with helm install if not passed. You can check configmap after deploying the helm chart to get the value. | | apisix.admin.credentials.secretName | string | `""` | The APISIX Helm chart supports storing user credentials in a secret. The secret needs to contain two keys, admin and viewer, with their respective values set. | | apisix.admin.credentials.viewer | string | `"4054f7cf07e344346cd3f287985e76a2"` | Apache APISIX admin API viewer role credentials | | apisix.admin.enabled | bool | `true` | Enable Admin API | diff --git a/charts/apisix/templates/configmap.yaml b/charts/apisix/templates/configmap.yaml index e3917c6b..5a564241 100644 --- a/charts/apisix/templates/configmap.yaml +++ b/charts/apisix/templates/configmap.yaml @@ -326,6 +326,8 @@ data: - name: "admin" {{- if .Values.apisix.admin.credentials.secretName }} key: ${{"{{"}}APISIX_ADMIN_KEY{{"}}"}} + {{- else if eq .Values.apisix.admin.credentials.admin "" }} + key: {{ randAlphaNum 32 }} {{- else }} key: {{ .Values.apisix.admin.credentials.admin }} {{- end }} diff --git a/charts/apisix/values.yaml b/charts/apisix/values.yaml index 6c7cd9c9..90df5e06 100644 --- a/charts/apisix/values.yaml +++ b/charts/apisix/values.yaml @@ -325,8 +325,8 @@ apisix: cors: true # -- Admin API credentials credentials: - # -- Apache APISIX admin API admin role credentials - admin: edd1c9f034335f136f87ad84b625c8f1 + # -- Apache APISIX admin API admin role credentials. This is autogenerated with helm install if not passed. You can check configmap after deploying the helm chart to get the value. + admin: '' # -- Apache APISIX admin API viewer role credentials viewer: 4054f7cf07e344346cd3f287985e76a2