-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* gke-ingress * revert nobl9 changes * revert nobl9 changes * revert nobl9 changes * service
- Loading branch information
1 parent
f123482
commit b6f1427
Showing
10 changed files
with
211 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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: [email protected] | ||
keywords: | ||
- ingress | ||
annotations: | ||
artifacthub.io/changes: | | ||
- Initial chart |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
|
||
* <https://github.com/ricardo-ch/helm-charts/tree/main/charts/gke-ingress> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" . }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 "gke-ingress.name" . }} | ||
{{- end }} | ||
{{- if hasKey .Values.service.labels "istio" }} | ||
{{- with .Values.service.labels.istio }} | ||
istio: {{.|quote}} | ||
{{- end}} | ||
{{- else }} | ||
istio: {{ include "gke-ingress.name" . | trimPrefix "istio-" }} | ||
{{- end }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{{range .Values.service}} | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: {{ .name }} | ||
namespace: {{ default "istio-ingress" .namespace}} | ||
labels: | ||
{{- include "gke-ingress.labels" . | nindent 4 }} | ||
annotations: | ||
{{- .annotations | toYaml | nindent 4 }} | ||
spec: | ||
type: {{ .type }} | ||
ports: | ||
{{ .ports | toYaml | indent 4 }} | ||
selector: | ||
{{- include "gke-ingress.selectorLabels" . | nindent 4 }} | ||
--- | ||
{{ end }} |
Empty file.