diff --git a/helm-chart/.helmignore b/helm-chart/.helmignore new file mode 100644 index 00000000..5f1d9344 --- /dev/null +++ b/helm-chart/.helmignore @@ -0,0 +1,3 @@ +*.tgz +index.yaml +.* \ No newline at end of file diff --git a/helm-chart/index.yaml b/helm-chart/index.yaml index c3b08536..c2a77498 100644 --- a/helm-chart/index.yaml +++ b/helm-chart/index.yaml @@ -2,12 +2,11 @@ apiVersion: v1 entries: streams-explorer: - apiVersion: v1 - created: "2021-01-14T15:55:38.126705142+01:00" + created: "2021-01-28T13:50:50.66258+01:00" description: A Helm chart for the Streams Explorer on Kubernetes - digest: e76bd05ecd88b6bb1482103b5067f30893eea93022fb3788c38c0da1698e9ed4 + digest: 188b7c05b012bad4bb1369a900f39601293b5df05708b750da0abb421f897fc4 name: streams-explorer urls: - streams-explorer-0.1.0.tgz version: 0.1.0 -generated: "2021-01-14T15:55:57+01:00" -serverInfo: {} +generated: "2021-01-28T13:50:50.661944+01:00" diff --git a/helm-chart/streams-explorer-0.1.0.tgz b/helm-chart/streams-explorer-0.1.0.tgz index 43705a3a..e356e6d0 100644 Binary files a/helm-chart/streams-explorer-0.1.0.tgz and b/helm-chart/streams-explorer-0.1.0.tgz differ diff --git a/helm-chart/templates/deployment.yaml b/helm-chart/templates/deployment.yaml index 633ff7df..82937c08 100644 --- a/helm-chart/templates/deployment.yaml +++ b/helm-chart/templates/deployment.yaml @@ -9,30 +9,29 @@ metadata: name: {{ .Release.Name }} {{- if .Values.labels }} labels: - {{- range $key, $value := .Values.labels }} - {{ $key }}: {{ $value }} + app.kubernetes.io/name: {{ include "streams-explorer.name" . }} + app.kubernetes.io/instance: {{ .Release.Name }} + app.kubernetes.io/managed-by: {{ .Release.Service }} + helm.sh/chart: {{ include "streams-explorer.chart" . }} + {{- range $key, $value := .Values.deploymentLabels }} + {{ $key }}: {{ $value | quote }} {{- end }} {{- end }} spec: replicas: {{ .Values.replicaCount }} selector: matchLabels: - app: {{ include "streams-explorer.name" . }} - chart: {{ include "streams-explorer.chart" . }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} - {{- range $key, $value := .Values.labels }} - {{ $key }}: {{ $value }} - {{- end }} + app.kubernetes.io/name: {{ include "streams-explorer.name" . }} + app.kubernetes.io/instance: {{ .Release.Name }} template: metadata: labels: - app: {{ include "streams-explorer.name" . }} - chart: {{ include "streams-explorer.chart" . }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} - {{- range $key, $value := .Values.labels }} - {{ $key }}: {{ $value }} + app.kubernetes.io/name: {{ include "streams-explorer.name" . }} + app.kubernetes.io/instance: {{ .Release.Name }} + app.kubernetes.io/managed-by: {{ .Release.Service }} + helm.sh/chart: {{ include "streams-explorer.chart" . }} + {{- range $key, $value := .Values.podLabels }} + {{ $key }}: {{ $value | quote }} {{- end }} {{- if or .Values.awsRole .Values.annotations }} annotations: diff --git a/helm-chart/templates/ingress.yaml b/helm-chart/templates/ingress.yaml index 1567431e..b4a1d271 100644 --- a/helm-chart/templates/ingress.yaml +++ b/helm-chart/templates/ingress.yaml @@ -1,6 +1,7 @@ {{- if .Values.ingress.enabled -}} {{- $fullName := include "streams-explorer.fullname" . -}} {{- $ingressPath := .Values.ingress.path -}} +{{- $sslRedirect := .Values.ingress.sslRedirect -}} {{- if .Capabilities.APIVersions.Has "networking.k8s.io/v1beta1" }} apiVersion: networking.k8s.io/v1beta1 {{- else }} @@ -34,6 +35,12 @@ spec: - host: {{ . | quote }} http: paths: + {{- if $sslRedirect }} + - path: /* + backend: + serviceName: ssl-redirect + servicePort: use-annotation + {{- end }} - path: {{ $ingressPath }} backend: serviceName: {{ $fullName }} diff --git a/helm-chart/templates/role.yaml b/helm-chart/templates/role.yaml index 29f07349..13f3b616 100644 --- a/helm-chart/templates/role.yaml +++ b/helm-chart/templates/role.yaml @@ -3,10 +3,10 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: Role metadata: labels: - app: {{ template "streams-explorer.name" . }} - chart: {{ template "streams-explorer.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} + app.kubernetes.io/name: {{ include "streams-explorer.name" . }} + app.kubernetes.io/instance: {{ .Release.Name }} + app.kubernetes.io/managed-by: {{ .Release.Service }} + helm.sh/chart: {{ include "streams-explorer.chart" . }} name: {{ template "streams-explorer.fullname" . }} rules: - apiGroups: ["apps", "batch"] diff --git a/helm-chart/templates/rolebinding.yaml b/helm-chart/templates/rolebinding.yaml index 3dc065a9..f7baad57 100644 --- a/helm-chart/templates/rolebinding.yaml +++ b/helm-chart/templates/rolebinding.yaml @@ -4,10 +4,10 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: RoleBinding metadata: labels: - app: {{ template "streams-explorer.name" . }} - chart: {{ template "streams-explorer.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} + app.kubernetes.io/name: {{ include "streams-explorer.name" . }} + app.kubernetes.io/instance: {{ .Release.Name }} + app.kubernetes.io/managed-by: {{ .Release.Service }} + helm.sh/chart: {{ include "streams-explorer.chart" . }} name: {{ template "streams-explorer.fullname" . }} roleRef: apiGroup: rbac.authorization.k8s.io diff --git a/helm-chart/templates/service.yaml b/helm-chart/templates/service.yaml index 6008554e..3984d3a7 100644 --- a/helm-chart/templates/service.yaml +++ b/helm-chart/templates/service.yaml @@ -3,15 +3,15 @@ kind: Service metadata: name: {{ template "streams-explorer.fullname" . }} labels: - app: {{ template "streams-explorer.name" . }} - chart: {{ template "streams-explorer.chart" . }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} + app.kubernetes.io/name: {{ include "streams-explorer.name" . }} + app.kubernetes.io/instance: {{ .Release.Name }} + app.kubernetes.io/managed-by: {{ .Release.Service }} + helm.sh/chart: {{ include "streams-explorer.chart" . }} spec: type: {{ .Values.service.type }} ports: - name: http port: {{ .Values.serviceHttpPort }} selector: - app: {{ template "streams-explorer.name" . }} - release: {{ .Release.Name }} + app.kubernetes.io/name: {{ include "streams-explorer.name" . }} + app.kubernetes.io/instance: {{ .Release.Name }} diff --git a/helm-chart/values.yaml b/helm-chart/values.yaml index 56f3ef6a..ced277bc 100644 --- a/helm-chart/values.yaml +++ b/helm-chart/values.yaml @@ -38,8 +38,9 @@ icons: {} # -labels: {} +deploymentLabels: {} +podLabels: {} service: type: ClusterIP @@ -50,13 +51,13 @@ serviceAccount: ingress: enabled: true - annotations: - kubernetes.io/ingress.class: nginx - nginx.ingress.kubernetes.io/force-ssl-redirect: "true" + annotations: {} path: / hosts: - sample.dev.daaa.cloud tls: [] + # Redirect http to https: https://kubernetes-sigs.github.io/aws-load-balancer-controller/v2.1/guide/tasks/ssl_redirect/ + sslRedirect: true resources: requests: