-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add dashbaord to helmchart
- Loading branch information
Showing
15 changed files
with
260 additions
and
8 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,13 @@ | ||
Thank you for installing {{ .Chart.Name }}. You can list your Task with: | ||
|
||
kubectl get tasks -n {{ .Release.Namespace }} | ||
{{ if .Values.dashboard.enabled }} | ||
The Dashboard is enabled. DO NOT MAKE IT AVAILABLE VIA INTERNET! | ||
You can use it with the following command (to forward a local port): | ||
|
||
kubectl port-forward -n kt-dev service/kubeteach-core-dashboard 8080:80 | ||
|
||
Now you can access the dashboard via http://localhost:8080 | ||
Username: {{ .Values.dashboard.credentials.username }} | ||
Password: {{ include "kubeteach.dashboardBasicAuthPassword" . }} | ||
{{- 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
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,11 @@ | ||
{{- if .Values.dashboard.credentials -}} | ||
apiVersion: v1 | ||
kind: Secret | ||
metadata: | ||
name: {{ include "kubeteach.name" . }} | ||
labels: | ||
{{- include "kubeteach.labels" . | nindent 4 }} | ||
stringData: | ||
user: "{{ .Values.dashboard.credentials.username | default "kubeteach" }}" | ||
password: {{ include "kubeteach.dashboardBasicAuthPassword" . }} | ||
{{- 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,17 @@ | ||
{{- if .Values.dashboard.enabled -}} | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: {{ include "kubeteach.name" . }}-dashboard | ||
labels: | ||
{{- include "kubeteach.labels" . | nindent 4 }} | ||
spec: | ||
ports: | ||
- name: dashboard | ||
port: {{ .Values.dashboard.service.port }} | ||
protocol: TCP | ||
targetPort: dashboard | ||
selector: | ||
{{- include "kubeteach.selectorLabels" . | nindent 4 }} | ||
type: {{ .Values.dashboard.service.type }} | ||
{{- 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
File renamed without changes.
File renamed without changes.
File renamed without changes.
62 changes: 62 additions & 0 deletions
62
charts/kubeteach-core/templates/webterminal-deployment.yaml
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,62 @@ | ||
{{- if .Values.webterminal.enabled -}} | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: {{ include "kubeteach.name" . }}-webterminal | ||
labels: | ||
{{- include "kubeteach.labels" . | nindent 4 }} | ||
spec: | ||
replicas: {{ .Values.replicaCount }} | ||
selector: | ||
matchLabels: | ||
{{- include "kubeteach.selectorLabelsWebterminal" . | nindent 6 }} | ||
template: | ||
metadata: | ||
{{- with .Values.podAnnotations }} | ||
annotations: | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} | ||
labels: | ||
{{- include "kubeteach.selectorLabelsWebterminal" . | nindent 8 }} | ||
spec: | ||
{{- with .Values.imagePullSecrets }} | ||
imagePullSecrets: | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} | ||
serviceAccountName: {{ include "kubeteach.webterminalServiceAccountName" . }} | ||
securityContext: | ||
{{- toYaml .Values.podSecurityContext | nindent 8 }} | ||
containers: | ||
- name: {{ .Chart.Name }}-webterminal | ||
env: | ||
- name: GOTTY_PATH | ||
value: "/shell/" | ||
- name: GOTTY_WS_ORIGIN | ||
value: ".*" | ||
- name: GOTTY_CREDENTIAL | ||
valueFrom: | ||
secretKeyRef: | ||
key: credentials | ||
name: {{ include "kubeteach.name" . }}-webterminal | ||
securityContext: | ||
{{- toYaml .Values.securityContext | nindent 12 }} | ||
image: "{{ .Values.images.kubeteachWebterminal.repository }}:{{ .Values.images.kubeteachWebterminal.tag | default "latest" }}" | ||
imagePullPolicy: {{ .Values.images.kubeteachWebterminal.pullPolicy }} | ||
ports: | ||
- containerPort: 8080 | ||
name: webterminal | ||
resources: | ||
{{- toYaml .Values.resources | nindent 12 }} | ||
{{- with .Values.nodeSelector }} | ||
nodeSelector: | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} | ||
{{- with .Values.affinity }} | ||
affinity: | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} | ||
{{- with .Values.tolerations }} | ||
tolerations: | ||
{{- toYaml . | nindent 8 }} | ||
{{- 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,31 @@ | ||
{{- if .Values.webterminal.serviceAccount.clusterAdmin -}} | ||
--- | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRole | ||
metadata: | ||
name: {{ include "kubeteach.name" . }}-webterminal | ||
rules: | ||
- apiGroups: | ||
- '*' | ||
resources: | ||
- '*' | ||
verbs: | ||
- '*' | ||
- nonResourceURLs: | ||
- '*' | ||
verbs: | ||
- '*' | ||
--- | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRoleBinding | ||
metadata: | ||
name: {{ include "kubeteach.name" . }}-webterminal | ||
roleRef: | ||
apiGroup: rbac.authorization.k8s.io | ||
kind: ClusterRole | ||
name: {{ include "kubeteach.name" . }}-webterminal | ||
subjects: | ||
- kind: ServiceAccount | ||
name: {{ include "kubeteach.webterminalServiceAccountName" . }} | ||
namespace: {{ .Release.Namespace }} | ||
{{- 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,10 @@ | ||
{{- if .Values.webterminal.credentials -}} | ||
apiVersion: v1 | ||
kind: Secret | ||
metadata: | ||
name: {{ include "kubeteach.name" . }}-webterminal | ||
labels: | ||
{{- include "kubeteach.labels" . | nindent 4 }} | ||
stringData: | ||
credentials: {{ include "kubeteach.webterminalCredentials" . }} | ||
{{- 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,17 @@ | ||
{{- if .Values.webterminal.enabled -}} | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: {{ include "kubeteach.name" . }}-dashboard-webterminal | ||
labels: | ||
{{- include "kubeteach.labels" . | nindent 4 }} | ||
spec: | ||
ports: | ||
- name: webterminal | ||
port: {{ .Values.webterminal.service.port }} | ||
protocol: TCP | ||
targetPort: webterminal | ||
selector: | ||
{{- include "kubeteach.selectorLabelsWebterminal" . | nindent 4 }} | ||
type: {{ .Values.webterminal.service.type }} | ||
{{- end}} |
10 changes: 10 additions & 0 deletions
10
charts/kubeteach-core/templates/webterminal-serviceaccount.yaml
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,10 @@ | ||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
name: {{ include "kubeteach.webterminalServiceAccountName" . }} | ||
labels: | ||
{{- include "kubeteach.labels" . | nindent 4 }} | ||
{{- with .Values.webterminal.serviceAccount.annotations }} | ||
annotations: | ||
{{- toYaml . | nindent 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