diff --git a/k8s/chart/templates/ingress.yaml b/k8s/chart/templates/ingress.yaml index 0b542e18..978810cd 100644 --- a/k8s/chart/templates/ingress.yaml +++ b/k8s/chart/templates/ingress.yaml @@ -1,52 +1,49 @@ {{- if .Values.ingress.enabled -}} -{{- $paths := .Values.ingress.paths -}} -apiVersion: networking.k8s.io/v1beta1 +apiVersion: networking.k8s.io/v1 kind: Ingress metadata: -{{- if .Values.ingress.annotations }} - annotations: - {{- range $key, $value := .Values.ingress.annotations }} - {{ $key }}: {{ $value | quote }} - {{- end }} -{{- end }} name: p3x-redis-ui-ingress - namespace: {{ .Release.Namespace }} labels: - app.kubernetes.io/name: p3x-redis-ui - helm.sh/chart: p3x-redis-ui - app.kubernetes.io/instance: {{ .Release.Name }} - app.kubernetes.io/managed-by: {{ .Release.Service }} - app.kubernetes.io/part-of: p3x-redis-ui - app.kubernetes.io/component: {{ .Release.Name }} + app: p3x-redis-ui + chart: p3x-redis-ui + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} {{- if .Values.ingress.labels }} -{{- toYaml .Values.ingress.labels | nindent 4 }} +{{ toYaml .Values.ingress.labels | indent 4 }} +{{- end }} +{{- with .Values.ingress.annotations }} + annotations: +{{ toYaml . | indent 4 }} {{- end }} spec: +{{- if .Values.ingress.tls }} + tls: +{{- range .Values.ingress.tls }} + - hosts: +{{- range .hosts }} + - {{ . | quote }} +{{- end }} + secretName: {{ .secretName }} +{{- end }} +{{- end }} + {{- if .Values.ingress.className }} + ingressClassName: {{ .Values.ingress.className | quote }} + {{- end }} rules: - {{- if .Values.ingress.hosts }} - {{- range $host := .Values.ingress.hosts }} - - host: {{ $host }} +{{- if .Values.ingress.enabled }} +{{- $uiPath := .Values.ingress.path -}} +{{- $uiPort := .Values.ingress.service.port -}} +{{- range .Values.ingress.hosts }} + - host: {{ . }} http: paths: - {{- range $p := $paths }} - - path: {{ $p }} - backend: - serviceName: p3x-redis-ui-service - servicePort: p3x-redis-ui - {{- end -}} - {{- end -}} - {{- else }} - - http: - paths: - {{- range $p := $paths }} - - path: {{ $p }} + - path: {{ $uiPath }} + pathType: Prefix backend: - serviceName: p3x-redis-ui-service - servicePort: p3x-redis-ui - {{- end -}} - {{- end -}} - {{- if .Values.ingress.tls }} - tls: -{{- toYaml .Values.ingress.tls | nindent 4 }} - {{- end -}} -{{- end -}} + service: + name: p3x-redis-ui-service + port: + number: {{ $uiPort }} +{{- end }} +{{- end }} +{{- end }} diff --git a/k8s/chart/values.yaml b/k8s/chart/values.yaml index 57d8aa48..1e5f6e90 100644 --- a/k8s/chart/values.yaml +++ b/k8s/chart/values.yaml @@ -1,4 +1,3 @@ - image: repository: patrikx3/p3x-redis-ui tag: latest @@ -16,34 +15,33 @@ resources: {} # cpu: 200m # memory: 200M -connections: [] -# - name: -# host: -# port: -# id: (unique) -# password: -# azure: false -# cluster: false -# awsElastiCache: false -# nodes: If you configure a cluster -# - host: -# port: -# id: -# password: +connections: + - name: daas-cache-kryon-dev.ptdwzp.0001.euc1.cache.amazonaws.com + host: daas-cache-kryon-dev.ptdwzp.0001.euc1.cache.amazonaws.com + port: 6379 + id: 1 + password: + azure: false + cluster: false + awsElastiCache: true service: type: ClusterIP # nodePort: 30200 If type is NodePort ingress: - enabled: false - annotations: {} - # kubernetes.io/ingress.class: nginx - # cert-manager.io/cluster-issuer: letsencrypt - paths: [/] - hosts: [] - tls: [] - # - hosts: [host] - # secretName: host-tls - -nodeSelector: {} + enabled: true + service: + port: 7843 + annotations: {} + path: / + hosts: + - cache.example.com + className: nginx-pd-release + tls: + - hosts: + - "cache.example.com" + secretName: example.com-tls + + +nodeSelector: {} \ No newline at end of file diff --git a/package.json b/package.json index 3ba62123..23ec4296 100644 --- a/package.json +++ b/package.json @@ -62,7 +62,7 @@ "author": "Patrik Laszlo ", "license": "MIT", "devDependencies": { - "axios": "^1.4.0", + "axios": "^1.5.0", "corifeus-builder": "^2023.10.135", "electron": "^26.1.0", "electron-builder": "^24.6.3",