Skip to content

Commit

Permalink
Merge pull request #47 from mesosphere/kommander
Browse files Browse the repository at this point in the history
update kommander and opsportal charts
  • Loading branch information
shaneutt authored Jul 18, 2019
2 parents 93ba778 + 1b4e56f commit 1731537
Show file tree
Hide file tree
Showing 19 changed files with 103 additions and 188 deletions.
2 changes: 1 addition & 1 deletion stable/kommander/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ name: kommander
home: https://github.com/mesosphere/kommander
appVersion: "1.40.0"
description: Kommander
version: 0.1.6
version: 0.1.7
maintainers:
- name: hectorj2f
5 changes: 4 additions & 1 deletion stable/kommander/templates/crd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,16 @@ metadata:
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
release: "{{ .Release.name }}"
heritage: "{{ .Release.Service }}"
annotations:
"helm.sh/hook": crd-install
"helm.sh/hook-delete-policy": "before-hook-creation"
spec:
group: stable.mesosphere.com
versions:
- name: v1
served: true
storage: true
scope: Cluster
scope: Namespaced
names:
plural: observableclusters
singular: observablecluster
Expand Down
4 changes: 3 additions & 1 deletion stable/kommander/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ spec:
app: {{ template "kommander.fullname" . }}
namespace: {{ .Release.Namespace }}
spec:
serviceAccountName: admin-user-kommander
serviceAccountName: {{ template "kommander.fullname" . }}
imagePullSecrets:
- name: dockerhub
initContainers:
Expand Down Expand Up @@ -54,3 +54,5 @@ spec:
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: MODE
value: {{ .Values.mode }}
12 changes: 9 additions & 3 deletions stable/kommander/templates/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,20 @@ metadata:
heritage: "{{ .Release.Service }}"
annotations:
kubernetes.io/ingress.class: traefik
{{- if (eq "konvoy" .Values.mode) }}
traefik.ingress.kubernetes.io/rewrite-target: /
traefik.ingress.kubernetes.io/priority: "1"
{{- else }}
traefik.frontend.rule.type: {{ .Values.ingress.traefikFrontendRuleType }}
{{- with .Values.ingress.extraAnnotations }}
{{- toYaml . | nindent 4 }}
{{- end }}
{{- end }}
spec:
rules:
- http:
paths:
{{- with .Values.ingress.paths }}
{{- toYaml . | nindent 10 }}
{{- end }}
- backend:
serviceName: {{ .Values.service.name }}
servicePort: 80
path: {{ .Values.ingress.path }}
23 changes: 23 additions & 0 deletions stable/kommander/templates/observablecluster.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{{- if (eq "konvoy" .Values.mode) }}
---
apiVersion: v1
kind: Secret
type: kubernetes.io/service-account-token
metadata:
name: {{ template "kommander.fullname" . }}-token
annotations:
kubernetes.io/service-account.name: {{ template "kommander.fullname" . }}
namespace: {{ .Release.Namespace }}
labels:
kommanderType: clusterToken
---
apiVersion: "stable.mesosphere.com/v1"
kind: ObservableCluster
metadata:
name: konvoy
namespace: {{ .Release.Namespace }}
spec:
displayName: konvoy
authenticationSecretName: {{ template "kommander.fullname" . }}-token
apiServer: https://kubernetes.default
{{ end }}
4 changes: 4 additions & 0 deletions stable/kommander/templates/serviceaccount.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,15 @@ apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ template "kommander.fullname" . }}
namespace: {{ .Release.Namespace }}
labels:
app: {{ template "kommander.fullname" . }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
release: "{{ .Release.name }}"
heritage: "{{ .Release.Service }}"
# pre-install for kubernetes.io/service-account-token
annotations:
helm.sh/hook: pre-install
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
Expand Down
11 changes: 4 additions & 7 deletions stable/kommander/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ image:
pullPolicy: IfNotPresent
replicas: 1

# Mode must be either production|konvoy
mode: production

extraInitContainers:

resources:
Expand All @@ -29,10 +32,4 @@ ingress:
traefikFrontendRuleType: PathPrefixStrip
# extraAnnotations:
# ingress.kubernetes.io/foo: bar
paths:
# kommander
- backend:
### This must match the service name set above
serviceName: kommander
servicePort: 4000
path: /ops/portal/kommander
path: /ops/portal/kommander
2 changes: 1 addition & 1 deletion stable/opsportal/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ apiVersion: v1
appVersion: "1.0.0"
description: OpsPortal Chart
name: opsportal
version: 0.0.1
version: 0.0.2
24 changes: 0 additions & 24 deletions stable/opsportal/html-templates/index.html

This file was deleted.

32 changes: 32 additions & 0 deletions stable/opsportal/templates/_helperts.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{{/* vim: set filetype=mustache: */}}
{{/*
Expand the name of the chart.
*/}}
{{- define "opsportal.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 "opsportal.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 "opsportal.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
{{- end -}}
40 changes: 0 additions & 40 deletions stable/opsportal/templates/configmap-landing.yaml

This file was deleted.

4 changes: 1 addition & 3 deletions stable/opsportal/templates/deployment-bearerproxy.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{{- if .Values.bearerproxy.enabled }}
---
apiVersion: apps/v1
kind: Deployment
Expand Down Expand Up @@ -32,5 +31,4 @@ spec:
valueFrom:
secretKeyRef:
key: token
name: ops-portal-admin-token
{{- end }}
name: {{ template "opsportal.fullname" . }}-token
36 changes: 0 additions & 36 deletions stable/opsportal/templates/deployment-landing.yaml

This file was deleted.

19 changes: 0 additions & 19 deletions stable/opsportal/templates/ingress-landing.yaml

This file was deleted.

12 changes: 1 addition & 11 deletions stable/opsportal/templates/ingress-opsportal.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,12 @@ metadata:
annotations:
kubernetes.io/ingress.class: traefik
traefik.frontend.rule.type: PathPrefixStrip
ingress.kubernetes.io/auth-secret: ops-portal-htpasswd
ingress.kubernetes.io/auth-type: basic
ingress.kubernetes.io/auth-header-field: X-WebAuth-User
name: ops-portal
name: {{ template "opsportal.fullname" . }}-addons
namespace: {{ .Release.Namespace }}
spec:
rules:
- http:
paths:
{{- if .Values.bearerproxy.enabled }}
# kubernetes-dashboard
- backend:
serviceName: {{ .Values.bearerproxy.ingress.backend.serviceName }}
servicePort: {{ .Values.bearerproxy.port }}
path: {{ .Values.bearerproxy.ingress.path }}
{{- end }}
{{- with .Values.opsportal.ingress.paths }}
{{ toYaml . | indent 10 }}
{{- end }}
21 changes: 15 additions & 6 deletions stable/opsportal/templates/roles-bearerproxy.yaml
Original file line number Diff line number Diff line change
@@ -1,22 +1,31 @@
{{- if .Values.bearerproxy.enabled }}
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: ops-portal-admin
name: {{ template "opsportal.fullname" . }}
namespace: {{ .Release.Namespace }}

# pre-install for kubernetes.io/service-account-token
annotations:
helm.sh/hook: pre-install
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: ops-portal-admin
name: {{ template "opsportal.fullname" . }}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: cluster-admin
subjects:
- kind: ServiceAccount
name: ops-portal-admin
name: {{ template "opsportal.fullname" . }}
namespace: {{ .Release.Namespace }}
{{- end }}
---
apiVersion: v1
kind: Secret
type: kubernetes.io/service-account-token
metadata:
name: {{ template "opsportal.fullname" . }}-token
annotations:
kubernetes.io/service-account.name: {{ template "opsportal.fullname" . }}
namespace: {{ .Release.Namespace }}
2 changes: 0 additions & 2 deletions stable/opsportal/templates/service-bearerproxy.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{{- if .Values.bearerproxy.enabled }}
---
apiVersion: v1
kind: Service
Expand All @@ -15,4 +14,3 @@ spec:
targetPort: 9091
selector:
app: bearerproxy
{{- end }}
16 changes: 0 additions & 16 deletions stable/opsportal/templates/service-landing.yaml

This file was deleted.

Loading

0 comments on commit 1731537

Please sign in to comment.