From a55300540b05ad204275f5837c8031bb31e884c9 Mon Sep 17 00:00:00 2001 From: aaronstutzer Date: Tue, 13 Feb 2024 09:28:11 +0100 Subject: [PATCH 1/5] gke-ingress --- README.md | 1 + charts/gke-ingress/Chart.yaml | 15 +++++ charts/gke-ingress/README.md | 22 ++++++++ charts/gke-ingress/README.md.gotmpl | 24 ++++++++ charts/gke-ingress/templates/_helpers.tpl | 58 ++++++++++++++++++++ charts/gke-ingress/templates/backend.yaml | 21 +++++++ charts/gke-ingress/templates/gateway.yaml | 12 ++++ charts/gke-ingress/templates/ingress.yaml | 40 ++++++++++++++ charts/gke-ingress/templates/service.yaml | 15 +++++ charts/gke-ingress/values.yaml | 0 charts/nobl9-agent/templates/_helpers.tpl | 28 ---------- charts/nobl9-agent/templates/deployment.yaml | 49 ----------------- charts/nobl9-agent/templates/secret.yaml | 14 ----- charts/nobl9-agent/values.yaml | 32 ----------- 14 files changed, 208 insertions(+), 123 deletions(-) create mode 100644 charts/gke-ingress/Chart.yaml create mode 100644 charts/gke-ingress/README.md create mode 100644 charts/gke-ingress/README.md.gotmpl create mode 100644 charts/gke-ingress/templates/_helpers.tpl create mode 100644 charts/gke-ingress/templates/backend.yaml create mode 100644 charts/gke-ingress/templates/gateway.yaml create mode 100644 charts/gke-ingress/templates/ingress.yaml create mode 100644 charts/gke-ingress/templates/service.yaml create mode 100644 charts/gke-ingress/values.yaml delete mode 100644 charts/nobl9-agent/templates/_helpers.tpl delete mode 100644 charts/nobl9-agent/templates/deployment.yaml delete mode 100644 charts/nobl9-agent/templates/secret.yaml delete mode 100644 charts/nobl9-agent/values.yaml diff --git a/README.md b/README.md index 37225e0..900fd92 100644 --- a/README.md +++ b/README.md @@ -13,6 +13,7 @@ The public Ricardo AG Helm Charts. The code is provided as-is with no warranties * [metrics-exporter](https://github.com/ricardo-ch/helm-charts/tree/main/charts/metrics-exporter) * [nobl9-agent](https://github.com/ricardo-ch/helm-charts/tree/main/charts/nobl9-agent) * [promlens](https://github.com/ricardo-ch/helm-charts/tree/main/charts/promlens) +* [gke-ingress](https://github.com/ricardo-ch/helm-charts/tree/main/charts/gke-ingress) ## How To Use These Charts diff --git a/charts/gke-ingress/Chart.yaml b/charts/gke-ingress/Chart.yaml new file mode 100644 index 0000000..f025740 --- /dev/null +++ b/charts/gke-ingress/Chart.yaml @@ -0,0 +1,15 @@ +apiVersion: v2 +name: gke-ingress +version: 0.1.0 +appVersion: 0.1.0 +description: gke-ingress and related resources +sources: + - https://github.com/ricardo-ch/helm-charts/tree/main/charts/gke-ingress +maintainers: + - name: ricardo-ch + email: sre@ricardo.ch +keywords: + - ingress +annotations: + artifacthub.io/changes: | + - Initial chart diff --git a/charts/gke-ingress/README.md b/charts/gke-ingress/README.md new file mode 100644 index 0000000..ab1ff67 --- /dev/null +++ b/charts/gke-ingress/README.md @@ -0,0 +1,22 @@ +# gke-ingress + +![Version: 0.1.0](https://img.shields.io/badge/Version-0.1.0-informational?style=flat-square) ![AppVersion: 0.1.0](https://img.shields.io/badge/AppVersion-0.1.0-informational?style=flat-square) ![Release Status](https://github.com/ricardo-ch/helm-charts/workflows/Release%20Charts/badge.svg) [![License](https://img.shields.io/github/license/ricardo-ch/helm-charts)](https://github.com/ricardo-ch/helm-charts/blob/main/LICENSE) + +gke-ingress and related resources + +## Helm Chart + +Deploy backends, gateways, services and ingress needed to expose the mesh through GKE gateways. [From edge to mesh guide from google](https://cloud.google.com/architecture/exposing-service-mesh-apps-through-gke-ingress) + +### How To Install + +Simply add this Chart repository to Helm: + +```sh +➜ helm repo add ricardo https://ricardo-ch.github.io/helm-charts/ +"ricardo" has been added to your repositories +``` + +## Source Code + +* diff --git a/charts/gke-ingress/README.md.gotmpl b/charts/gke-ingress/README.md.gotmpl new file mode 100644 index 0000000..e5dfdcf --- /dev/null +++ b/charts/gke-ingress/README.md.gotmpl @@ -0,0 +1,24 @@ +# {{ template "chart.name" . }} + +{{ template "chart.deprecationWarning" . }} + +{{ template "chart.versionBadge" . }}{{ template "chart.typeBadge" . }}{{ template "chart.appVersionBadge" . }}![Release Status](https://github.com/ricardo-ch/helm-charts/workflows/Release%20Charts/badge.svg) [![License](https://img.shields.io/github/license/ricardo-ch/helm-charts)](https://github.com/ricardo-ch/helm-charts/blob/main/LICENSE) + +gke-ingress and related resources + +## Helm Chart + +Deploy backends, gateways, services and ingress needed to expose the mesh through GKE gateways. [From edge to mesh guide from google](https://cloud.google.com/architecture/exposing-service-mesh-apps-through-gke-ingress) + +### How To Install + +Simply add this Chart repository to Helm: + +```sh +➜ helm repo add ricardo https://ricardo-ch.github.io/helm-charts/ +"ricardo" has been added to your repositories +``` + +{{ template "chart.valuesSection" . }} + +{{ template "chart.sourcesSection" . }} diff --git a/charts/gke-ingress/templates/_helpers.tpl b/charts/gke-ingress/templates/_helpers.tpl new file mode 100644 index 0000000..932ef6c --- /dev/null +++ b/charts/gke-ingress/templates/_helpers.tpl @@ -0,0 +1,58 @@ +{{- define "gke-ingress.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +If release name contains chart name it will be used as a full name. +*/}} +{{- define "gke-ingress.fullname" -}} +{{- if .Values.fullnameOverride -}} +{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- $name := default .Chart.Name .Values.nameOverride -}} +{{- if contains $name .Release.Name -}} +{{- .Release.Name | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} +{{- end -}} +{{- end -}} + +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define "gke-ingress.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{- define "gke-ingress.labels" -}} +helm.sh/chart: {{ include "gke-ingress.chart" . }} +{{ include "gke-ingress.selectorLabels" . }} +{{- if .Chart.AppVersion }} +app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} +{{- end }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +app.kubernetes.io/name: {{ include "gke-ingress.name" . }} +{{- range $key, $val := .Values.service.labels }} +{{- if not (or (eq $key "app") (eq $key "istio")) }} +{{ $key | quote }}: {{ $val | quote }} +{{- end }} +{{- end }} +{{- end }} + +{{- define "gke-ingress.selectorLabels" -}} +{{- if hasKey .Values.service.labels "app" }} +{{- with .Values.service.labels.app }}app: {{.|quote}} +{{- end}} +{{- else }}app: {{ include "gateway.name" . }} +{{- end }} +{{- if hasKey .Values.service.labels "istio" }} +{{- with .Values.service.labels.istio }} +istio: {{.|quote}} +{{- end}} +{{- else }} +istio: {{ include "gateway.name" . | trimPrefix "istio-" }} +{{- end }} +{{- end }} \ No newline at end of file diff --git a/charts/gke-ingress/templates/backend.yaml b/charts/gke-ingress/templates/backend.yaml new file mode 100644 index 0000000..85b2b30 --- /dev/null +++ b/charts/gke-ingress/templates/backend.yaml @@ -0,0 +1,21 @@ +{{ range .Values.backends }} +apiVersion: cloud.google.com/v1 +kind: BackendConfig +metadata: + name: {{ .name }} + namespace: {{ default "istio-ingress" .namespace }} +spec: + healthCheck: +{{ toYaml .healthCheck | indent 4}} +{{- if .policyName}} + securityPolicy: + name: {{.policyName}} +{{- end}} +{{- if .iap}} + iap: + enabled: {{.iap.enabled}} + oauthclientCredentials: + secretName: {{.iap.secretName}} +{{- end}} +--- +{{end}} diff --git a/charts/gke-ingress/templates/gateway.yaml b/charts/gke-ingress/templates/gateway.yaml new file mode 100644 index 0000000..d369c01 --- /dev/null +++ b/charts/gke-ingress/templates/gateway.yaml @@ -0,0 +1,12 @@ +{{with .Values.gateway}} +apiVersion: networking.istio.io/v1alpha3 +kind: Gateway +metadata: + name: {{.name}} + namespace: {{ default "istio-ingress" .namespace }} +spec: + selector: +{{toYaml .selector | indent 4}} + servers: +{{toYaml .servers | indent 4}} +{{end}} diff --git a/charts/gke-ingress/templates/ingress.yaml b/charts/gke-ingress/templates/ingress.yaml new file mode 100644 index 0000000..2dd7b48 --- /dev/null +++ b/charts/gke-ingress/templates/ingress.yaml @@ -0,0 +1,40 @@ +{{range .Values.ingress}} +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: {{.name}} + namespace: {{ default "istio-ingress" .namespace}} + annotations: +{{toYaml .annotations | indent 4}} + {{- if .labels }} + labels: +{{toYaml .labels | indent 4}} + {{- end}} +spec: + {{- if .class}} + ingressClassName: {{.class}} + {{- end}} + defaultBackend: + service: + name: {{.defaultBackend.name}} + port: + number: {{.defaultBackend.port}} +{{- if .rules }} +{{- range .rules}} + rules: + - http: + paths: + - path: {{.path}} + pathType: {{.type}} + backend: + service: + name: {{.backend.name}} + port: + number: {{.backend.port}} + {{- if .host}} + host: {{.host}} + {{- end}} +{{end}} +{{end}} +--- +{{end}} \ No newline at end of file diff --git a/charts/gke-ingress/templates/service.yaml b/charts/gke-ingress/templates/service.yaml new file mode 100644 index 0000000..fa46cbe --- /dev/null +++ b/charts/gke-ingress/templates/service.yaml @@ -0,0 +1,15 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ .Values.service.name }} + namespace: {{ .Release.Namespace }} + labels: + {{- include "gke-ingress.labels" . | nindent 4 }} + annotations: + {{- .Values.service.annotations | toYaml | nindent 4 }} +spec: + type: {{ .Values.service.type }} + ports: +{{ .Values.service.ports | toYaml | indent 4 }} + selector: + {{- include "gke-ingress.selectorLabels" . | nindent 4 }} \ No newline at end of file diff --git a/charts/gke-ingress/values.yaml b/charts/gke-ingress/values.yaml new file mode 100644 index 0000000..e69de29 diff --git a/charts/nobl9-agent/templates/_helpers.tpl b/charts/nobl9-agent/templates/_helpers.tpl deleted file mode 100644 index 2ab408b..0000000 --- a/charts/nobl9-agent/templates/_helpers.tpl +++ /dev/null @@ -1,28 +0,0 @@ -{{- define "nobl9-agent.name" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Create a default fully qualified app name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -If release name contains chart name it will be used as a full name. -*/}} -{{- define "nobl9-agent.fullname" -}} -{{- if .Values.fullnameOverride -}} -{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- $name := default .Chart.Name .Values.nameOverride -}} -{{- if contains $name .Release.Name -}} -{{- .Release.Name | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} -{{- end -}} -{{- end -}} -{{- end -}} - -{{/* -Create chart name and version as used by the chart label. -*/}} -{{- define "nobl9-agent.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} -{{- end -}} diff --git a/charts/nobl9-agent/templates/deployment.yaml b/charts/nobl9-agent/templates/deployment.yaml deleted file mode 100644 index 0f238c1..0000000 --- a/charts/nobl9-agent/templates/deployment.yaml +++ /dev/null @@ -1,49 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ template "nobl9-agent.fullname" . }} - namespace: {{ .Release.Namespace }} - labels: - app: {{ template "nobl9-agent.name" . }} - chart: {{ template "nobl9-agent.chart" . }} - release: {{ .Release.Name | quote }} - heritage: {{ .Release.Service | quote }} -spec: - replicas: 1 - strategy: - type: Recreate - selector: - matchLabels: - app: {{ template "nobl9-agent.name" . }} - nobl9-agent-name: {{ .Values.config.datasource_name | quote }} - nobl9-agent-project: {{ .Values.config.project | quote }} - nobl9-agent-organization: {{ .Values.config.organization | quote }} - template: - metadata: - labels: - app: {{ template "nobl9-agent.name" . }} - nobl9-agent-name: {{ .Values.config.datasource_name | quote }} - nobl9-agent-project: {{ .Values.config.project | quote }} - nobl9-agent-organization: {{ .Values.config.organization | quote }} - {{- if .Values.pod_annotations }} - annotations: -{{ toYaml .Values.pod_annotations | indent 8 }} - {{ end }} - spec: - containers: - - name: agent-container - image: {{ .Values.deployment.image }}:{{ .Values.deployment.version }} - imagePullPolicy: {{ .Values.deployment.pull_policy }} - resources: -{{ toYaml .Values.resources | indent 12 }} - env: - - name: N9_CLIENT_ID - valueFrom: - secretKeyRef: - key: client_id - name: {{ template "nobl9-agent.fullname" . }} - - name: N9_CLIENT_SECRET - valueFrom: - secretKeyRef: - key: client_secret - name: {{ template "nobl9-agent.fullname" . }} diff --git a/charts/nobl9-agent/templates/secret.yaml b/charts/nobl9-agent/templates/secret.yaml deleted file mode 100644 index 041b31f..0000000 --- a/charts/nobl9-agent/templates/secret.yaml +++ /dev/null @@ -1,14 +0,0 @@ -apiVersion: v1 -kind: Secret -metadata: - name: {{ template "nobl9-agent.fullname" . }} - namespace: {{ .Release.Namespace }} - labels: - app: {{ template "nobl9-agent.name" . }} - chart: {{ template "nobl9-agent.chart" . }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} -type: Opaque -stringData: - client_id: {{ .Values.config.client_id | quote }} - client_secret: {{ .Values.config.client_secret | quote }} diff --git a/charts/nobl9-agent/values.yaml b/charts/nobl9-agent/values.yaml deleted file mode 100644 index 01e9597..0000000 --- a/charts/nobl9-agent/values.yaml +++ /dev/null @@ -1,32 +0,0 @@ -deployment: - # -- Nobl9 Agent Container Image - image: "nobl9/agent" - # -- Nobl9 Agent Container Image Version - version: "0.36.0" - # -- Pull Policy - pull_policy: IfNotPresent - -# -- Set custom pod annotations -pod_annotations: {} - -# -- Set kubernetes specific resource limits -resources: - # limits: - # cpu: "0.5" - # memory: "700Mi" - requests: - cpu: "0.1" - memory: "350Mi" - -# -- Agent Configuration, get this data from the Nobl9 UI -config: - # -- Name of the organization - organization: "" - # -- Name of the datasource - datasource_name: "" - # -- Name of the project - project: "" - # -- Client ID - client_id: "placeholder" - # -- Client Secret - client_secret: "placeholder" From 3b07629fd59113cf0959f1d3992876dc202d5316 Mon Sep 17 00:00:00 2001 From: aaronstutzer Date: Tue, 13 Feb 2024 09:47:42 +0100 Subject: [PATCH 2/5] revert nobl9 changes --- charts/nobl9-agent/templates/_helpers.tpl | 28 +++++++++++ charts/nobl9-agent/templates/deployment.yaml | 49 ++++++++++++++++++++ charts/nobl9-agent/templates/secret.yaml | 14 ++++++ charts/nobl9-agent/values.yaml | 32 +++++++++++++ 4 files changed, 123 insertions(+) create mode 100644 charts/nobl9-agent/templates/_helpers.tpl create mode 100644 charts/nobl9-agent/templates/deployment.yaml create mode 100644 charts/nobl9-agent/templates/secret.yaml create mode 100644 charts/nobl9-agent/values.yaml diff --git a/charts/nobl9-agent/templates/_helpers.tpl b/charts/nobl9-agent/templates/_helpers.tpl new file mode 100644 index 0000000..1543a6c --- /dev/null +++ b/charts/nobl9-agent/templates/_helpers.tpl @@ -0,0 +1,28 @@ +{{- define "nobl9-agent.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +If release name contains chart name it will be used as a full name. +*/}} +{{- define "nobl9-agent.fullname" -}} +{{- if .Values.fullnameOverride -}} +{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- $name := default .Chart.Name .Values.nameOverride -}} +{{- if contains $name .Release.Name -}} +{{- .Release.Name | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} +{{- end -}} +{{- end -}} + +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define "nobl9-agent.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} +{{- end -}} \ No newline at end of file diff --git a/charts/nobl9-agent/templates/deployment.yaml b/charts/nobl9-agent/templates/deployment.yaml new file mode 100644 index 0000000..654aa7d --- /dev/null +++ b/charts/nobl9-agent/templates/deployment.yaml @@ -0,0 +1,49 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ template "nobl9-agent.fullname" . }} + namespace: {{ .Release.Namespace }} + labels: + app: {{ template "nobl9-agent.name" . }} + chart: {{ template "nobl9-agent.chart" . }} + release: {{ .Release.Name | quote }} + heritage: {{ .Release.Service | quote }} +spec: + replicas: 1 + strategy: + type: Recreate + selector: + matchLabels: + app: {{ template "nobl9-agent.name" . }} + nobl9-agent-name: {{ .Values.config.datasource_name | quote }} + nobl9-agent-project: {{ .Values.config.project | quote }} + nobl9-agent-organization: {{ .Values.config.organization | quote }} + template: + metadata: + labels: + app: {{ template "nobl9-agent.name" . }} + nobl9-agent-name: {{ .Values.config.datasource_name | quote }} + nobl9-agent-project: {{ .Values.config.project | quote }} + nobl9-agent-organization: {{ .Values.config.organization | quote }} + {{- if .Values.pod_annotations }} + annotations: +{{ toYaml .Values.pod_annotations | indent 8 }} + {{ end }} + spec: + containers: + - name: agent-container + image: {{ .Values.deployment.image }}:{{ .Values.deployment.version }} + imagePullPolicy: {{ .Values.deployment.pull_policy }} + resources: +{{ toYaml .Values.resources | indent 12 }} + env: + - name: N9_CLIENT_ID + valueFrom: + secretKeyRef: + key: client_id + name: {{ template "nobl9-agent.fullname" . }} + - name: N9_CLIENT_SECRET + valueFrom: + secretKeyRef: + key: client_secret + name: {{ template "nobl9-agent.fullname" . }} \ No newline at end of file diff --git a/charts/nobl9-agent/templates/secret.yaml b/charts/nobl9-agent/templates/secret.yaml new file mode 100644 index 0000000..8d81aeb --- /dev/null +++ b/charts/nobl9-agent/templates/secret.yaml @@ -0,0 +1,14 @@ +apiVersion: v1 +kind: Secret +metadata: + name: {{ template "nobl9-agent.fullname" . }} + namespace: {{ .Release.Namespace }} + labels: + app: {{ template "nobl9-agent.name" . }} + chart: {{ template "nobl9-agent.chart" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +type: Opaque +stringData: + client_id: {{ .Values.config.client_id | quote }} + client_secret: {{ .Values.config.client_secret | quote }} \ No newline at end of file diff --git a/charts/nobl9-agent/values.yaml b/charts/nobl9-agent/values.yaml new file mode 100644 index 0000000..2da80e1 --- /dev/null +++ b/charts/nobl9-agent/values.yaml @@ -0,0 +1,32 @@ +deployment: + # -- Nobl9 Agent Container Image + image: "nobl9/agent" + # -- Nobl9 Agent Container Image Version + version: "0.36.0" + # -- Pull Policy + pull_policy: IfNotPresent + +# -- Set custom pod annotations +pod_annotations: {} + +# -- Set kubernetes specific resource limits +resources: + # limits: + # cpu: "0.5" + # memory: "700Mi" + requests: + cpu: "0.1" + memory: "350Mi" + +# -- Agent Configuration, get this data from the Nobl9 UI +config: + # -- Name of the organization + organization: "" + # -- Name of the datasource + datasource_name: "" + # -- Name of the project + project: "" + # -- Client ID + client_id: "placeholder" + # -- Client Secret + client_secret: "placeholder" \ No newline at end of file From 6c03fb6bd86475c66b0e0b7bfb8904a4e35ea6df Mon Sep 17 00:00:00 2001 From: aaronstutzer Date: Tue, 13 Feb 2024 09:49:11 +0100 Subject: [PATCH 3/5] revert nobl9 changes --- charts/nobl9-agent/templates/_helpers.tpl | 2 +- charts/nobl9-agent/templates/deployment.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/nobl9-agent/templates/_helpers.tpl b/charts/nobl9-agent/templates/_helpers.tpl index 1543a6c..2ab408b 100644 --- a/charts/nobl9-agent/templates/_helpers.tpl +++ b/charts/nobl9-agent/templates/_helpers.tpl @@ -25,4 +25,4 @@ Create chart name and version as used by the chart label. */}} {{- define "nobl9-agent.chart" -}} {{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} -{{- end -}} \ No newline at end of file +{{- end -}} diff --git a/charts/nobl9-agent/templates/deployment.yaml b/charts/nobl9-agent/templates/deployment.yaml index 654aa7d..0f238c1 100644 --- a/charts/nobl9-agent/templates/deployment.yaml +++ b/charts/nobl9-agent/templates/deployment.yaml @@ -46,4 +46,4 @@ spec: valueFrom: secretKeyRef: key: client_secret - name: {{ template "nobl9-agent.fullname" . }} \ No newline at end of file + name: {{ template "nobl9-agent.fullname" . }} From 005ae8ae6c876cf31efd05a5276f886badc0ad1a Mon Sep 17 00:00:00 2001 From: aaronstutzer Date: Tue, 13 Feb 2024 09:49:42 +0100 Subject: [PATCH 4/5] revert nobl9 changes --- charts/nobl9-agent/templates/secret.yaml | 2 +- charts/nobl9-agent/values.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/nobl9-agent/templates/secret.yaml b/charts/nobl9-agent/templates/secret.yaml index 8d81aeb..041b31f 100644 --- a/charts/nobl9-agent/templates/secret.yaml +++ b/charts/nobl9-agent/templates/secret.yaml @@ -11,4 +11,4 @@ metadata: type: Opaque stringData: client_id: {{ .Values.config.client_id | quote }} - client_secret: {{ .Values.config.client_secret | quote }} \ No newline at end of file + client_secret: {{ .Values.config.client_secret | quote }} diff --git a/charts/nobl9-agent/values.yaml b/charts/nobl9-agent/values.yaml index 2da80e1..01e9597 100644 --- a/charts/nobl9-agent/values.yaml +++ b/charts/nobl9-agent/values.yaml @@ -29,4 +29,4 @@ config: # -- Client ID client_id: "placeholder" # -- Client Secret - client_secret: "placeholder" \ No newline at end of file + client_secret: "placeholder" From e2c757af0dcb245fbebf91c19bcc8a594e11802c Mon Sep 17 00:00:00 2001 From: aaronstutzer Date: Tue, 13 Feb 2024 10:10:32 +0100 Subject: [PATCH 5/5] service --- charts/gke-ingress/templates/_helpers.tpl | 4 ++-- charts/gke-ingress/templates/service.yaml | 15 +++++++++------ 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/charts/gke-ingress/templates/_helpers.tpl b/charts/gke-ingress/templates/_helpers.tpl index 932ef6c..432e2f4 100644 --- a/charts/gke-ingress/templates/_helpers.tpl +++ b/charts/gke-ingress/templates/_helpers.tpl @@ -46,13 +46,13 @@ app.kubernetes.io/name: {{ include "gke-ingress.name" . }} {{- if hasKey .Values.service.labels "app" }} {{- with .Values.service.labels.app }}app: {{.|quote}} {{- end}} -{{- else }}app: {{ include "gateway.name" . }} +{{- else }}app: {{ include "gke-ingress.name" . }} {{- end }} {{- if hasKey .Values.service.labels "istio" }} {{- with .Values.service.labels.istio }} istio: {{.|quote}} {{- end}} {{- else }} -istio: {{ include "gateway.name" . | trimPrefix "istio-" }} +istio: {{ include "gke-ingress.name" . | trimPrefix "istio-" }} {{- end }} {{- end }} \ No newline at end of file diff --git a/charts/gke-ingress/templates/service.yaml b/charts/gke-ingress/templates/service.yaml index fa46cbe..fb2f160 100644 --- a/charts/gke-ingress/templates/service.yaml +++ b/charts/gke-ingress/templates/service.yaml @@ -1,15 +1,18 @@ +{{range .Values.service}} apiVersion: v1 kind: Service metadata: - name: {{ .Values.service.name }} - namespace: {{ .Release.Namespace }} + name: {{ .name }} + namespace: {{ default "istio-ingress" .namespace}} labels: {{- include "gke-ingress.labels" . | nindent 4 }} annotations: - {{- .Values.service.annotations | toYaml | nindent 4 }} + {{- .annotations | toYaml | nindent 4 }} spec: - type: {{ .Values.service.type }} + type: {{ .type }} ports: -{{ .Values.service.ports | toYaml | indent 4 }} +{{ .ports | toYaml | indent 4 }} selector: - {{- include "gke-ingress.selectorLabels" . | nindent 4 }} \ No newline at end of file + {{- include "gke-ingress.selectorLabels" . | nindent 4 }} +--- +{{ end }} \ No newline at end of file