add config property to save the additional configuration

Signed-off-by: Roland.Ma <rolandma@yunify.com>
This commit is contained in:
Roland.Ma
2021-09-02 03:31:58 +00:00
parent f5b98a39e5
commit 9360dfd1b2
5 changed files with 14 additions and 4 deletions

View File

@@ -42,6 +42,10 @@ spec:
additionalProperties:
type: string
type: object
config:
additionalProperties:
type: string
type: object
replicas:
format: int32
type: integer

View File

@@ -1,6 +1,6 @@
apiVersion: v2
appVersion: 1.16.0
description: A Helm chart for Kubernetes
description: The Gateway helm Chart creates a Nginx Ingress Controller release by render a Nginx.gateway.kubesphere.io Kind.
name: gateway
type: application
version: 0.1.0

View File

@@ -16,7 +16,9 @@ spec:
enabled: {{ eq .Values.service.type "LoadBalancer" }}
# Will add custom configuration options to Nginx https://kubernetes.github.io/ingress-nginx/user-guide/nginx-configuration/configmap/
config: {}
{{- if .Values.controller.config }}
config: {{ toYaml .Values.controller.config | nindent 6 }}
{{- end }}
## Annotations to be added to the controller config configuration configmap
##
@@ -256,7 +258,7 @@ spec:
enabled: true
serviceMonitor:
enabled: false
enabled: true
prometheusRule:
enabled: false

View File

@@ -3,13 +3,15 @@
controller:
replicas: 1
annotations: {}
# add custom configuration options
config: {}
## Limit the scope of the controller
##
scope:
enabled: false
namespace: "" # defaults to .Release.Namespace
image:
repository: kubesphere/ingress-nginx-controller
repository: kubesphere/nginx-ingress-controller
tag: "v0.48.1"
pullPolicy: IfNotPresent

View File

@@ -35,6 +35,8 @@ type ControllerSpec struct {
// +optional
Annotations map[string]string `json:"annotations,omitempty"`
// +optional
Config map[string]string `json:"config,omitempty"`
// +optional
Scope Scope `json:"scope,omitempty"`
}