From 7ced3c352f442046a2c252a34f0f5ac99ac3f774 Mon Sep 17 00:00:00 2001 From: Dominik Rieder Date: Tue, 9 Apr 2024 08:46:04 +0200 Subject: [PATCH] add nodePort to service --- charts/xwiki/Chart.yaml | 22 ++++++------- charts/xwiki/templates/service.yaml | 5 +++ charts/xwiki/values.yaml | 51 ++++++++++++++++++----------- 3 files changed, 47 insertions(+), 31 deletions(-) diff --git a/charts/xwiki/Chart.yaml b/charts/xwiki/Chart.yaml index 64707ce..01fed8b 100644 --- a/charts/xwiki/Chart.yaml +++ b/charts/xwiki/Chart.yaml @@ -1,23 +1,23 @@ apiVersion: v2 description: XWiki is a free wiki software platform written in Java with a design emphasis on extensibility. XWiki is an enterprise wiki. It includes WYSIWYG editing, OpenDocument based document import/export, semantic annotations and tagging, and advanced permissions management. name: xwiki -version: 1.3.0 +version: 1.3.1 type: application keywords: -- xwiki + - xwiki home: http://xwiki.org icon: https://www.xwiki.org/xwiki/bin/download/Main/Logo/logo-x.png sources: -- https://github.com/xwiki-contrib/docker-xwiki + - https://github.com/xwiki-contrib/docker-xwiki maintainers: -- name: Ashish Sharma - email: sharma.ashish960@gmail.com -- name: Ludovic Dubost - email: ludovic@xwiki.com -- name: Guilherme Sautner - email: guilherme.sautner@xwiki.com -- name: Arsène Fougerouse - email: arsene.fougerouse@xwiki.com + - name: Ashish Sharma + email: sharma.ashish960@gmail.com + - name: Ludovic Dubost + email: ludovic@xwiki.com + - name: Guilherme Sautner + email: guilherme.sautner@xwiki.com + - name: Arsène Fougerouse + email: arsene.fougerouse@xwiki.com dependencies: - name: "common" repository: "https://charts.bitnami.com/bitnami" diff --git a/charts/xwiki/templates/service.yaml b/charts/xwiki/templates/service.yaml index eec5ea9..bfaf72d 100644 --- a/charts/xwiki/templates/service.yaml +++ b/charts/xwiki/templates/service.yaml @@ -17,6 +17,11 @@ spec: targetPort: {{ .Values.service.internalPort }} protocol: TCP name: {{ .Values.service.name }} + {{- if (and (or (eq .Values.service.type "NodePort") (eq .Values.service.type "LoadBalancer")) (not (empty .Values.service.nodePorts.http))) }} + nodePort: {{ .Values.service.nodePorts.http }} + {{- else if eq .Values.service.type "ClusterIP" }} + nodePort: null + {{- end }} {{- if .Values.prometheus.javaagent.enabled }} - port: {{ .Values.prometheus.javaagent.port }} targetPort: {{ .Values.prometheus.javaagent.port }} diff --git a/charts/xwiki/values.yaml b/charts/xwiki/values.yaml index 40ef5e8..eddfa50 100644 --- a/charts/xwiki/values.yaml +++ b/charts/xwiki/values.yaml @@ -13,20 +13,29 @@ cluster: image: name: xwiki pullPolicy: IfNotPresent -## Image Tag useful when externalDB is been used - tag: '' + ## Image Tag useful when externalDB is been used + tag: "" + service: portName: node name: http type: ClusterIP externalPort: 80 internalPort: 8080 + ## Node ports to expose + ## @param service.nodePorts.http Node port for HTTP + ## NOTE: choose port between <30000-32767> + ## + nodePorts: + http: "" # Set an array of externalIPs for the service - externalIPs: [] + externalIPs: + [] # - 10.20.30.40 # - 10.20.30.41 # Reference: https://kubernetes.io/docs/reference/networking/virtual-ips/#session-affinity sessionAffinity: ClientIP + resources: {} # limits: # cpu: 2000m @@ -69,7 +78,7 @@ volumePermissions: ## https://github.com/bitnami/charts/tree/main/bitnami/mysql ## mysql: - ## Whether to deploy a mysql server. Set false for a different database. + ## Whether to deploy a mysql server. Set false for a different database. enabled: true auth: rootPassword: "xwiki" @@ -120,7 +129,7 @@ mysql: ## https://github.com/bitnami/charts/tree/main/bitnami/mariadb ## mariadb: - ## Whether to deploy a mysql server. Set false for a different database. + ## Whether to deploy a mysql server. Set false for a different database. enabled: false auth: rootPassword: "xwiki" @@ -161,13 +170,14 @@ mariadb: port=3306 socket=/opt/bitnami/mariadb/tmp/mysql.sock pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid + ## ## PostgreSQL chart configuration ## ## https://github.com/helm/charts/tree/master/stable/postgresql ## postgresql: - ## Whether to deploy a postgresql server. Set false for a different database. + ## Whether to deploy a postgresql server. Set false for a different database. enabled: false auth: postgresPassword: "xwiki" @@ -183,15 +193,15 @@ postgresql: ## Set the image tag if want to use externalDB ## externalDB: - password: '' - user: '' - database: '' - host: '' -# If set to true default secret will not be created, use custom secret + password: "" + user: "" + database: "" + host: "" + # If set to true default secret will not be created, use custom secret customKeyRef: enabled: false - name: '' - key: '' + name: "" + key: "" ## ## To use external solr enable solr, provide host and port @@ -201,7 +211,8 @@ solr: enabled: false replicaCount: 1 image: gridexx/xwiki:solr8 - extraEnvVars: [] + extraEnvVars: + [] # - name: FOO # value: "bar" resources: {} @@ -275,7 +286,6 @@ istio: # name: issuer # kind: ClusterIssuer - persistence: enabled: true existingClaim: "" @@ -299,14 +309,16 @@ podDisruptionBudget: nodeSelector: {} # Reference: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ -tolerations: [] +tolerations: + [] # - key: "key" # operator: "Equal" # value: "value" # effect: "NoSchedule" # https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ -affinity: {} +affinity: + {} # nodeAffinity: # requiredDuringSchedulingIgnoredDuringExecution: # nodeSelectorTerms: @@ -325,16 +337,15 @@ affinity: {} # imagePullSecrets: [] - # Custom configuration files for xwiki customConfigs: # Properties key that exists, replace in line is done with value here defined. # If key don't exists, this key and value will be appended in that specific file. # This files are list of key: value that are translated as key=value in that file. # xwiki.cfg: - # + # # xwiki.properties: - # + # # Properties to be passed to Java process with -D parameters using JAVA_OPTS properties: