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: additionalProperties:
type: string type: string
type: object type: object
config:
additionalProperties:
type: string
type: object
replicas: replicas:
format: int32 format: int32
type: integer type: integer

View File

@@ -1,6 +1,6 @@
apiVersion: v2 apiVersion: v2
appVersion: 1.16.0 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 name: gateway
type: application type: application
version: 0.1.0 version: 0.1.0

View File

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

View File

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

View File

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