Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • xeruf/dashboard
  • stackspin/dashboard
2 results
Show changes
Showing
with 809 additions and 417 deletions
FROM nginx:latest FROM nginx:1.27
COPY ./nginx.conf /etc/nginx/nginx.conf COPY ./nginx.conf /etc/nginx/nginx.conf
COPY . /usr/share/nginx/html COPY html /usr/share/nginx/html
# Changelog # Changelog
## [1.7.5] ## 1.14.0
* Update dashboard to version 0.14.0.
## 1.13.3
* Update dashboard to version 0.13.3.
## 1.13.2
* Update dashboard to version 0.13.2.
## 1.13.1
* Update dashboard to version 0.13.1.
## 1.13.0
* Update dashboard to version 0.13.0.
* Add a helm value `overlay`. If enabled, mount an extra persistent volume claim
`dashboard-overlay` with files to be served by the frontend pod, and an rsync
server container to allow uploading files to the volume.
## 1.12.4
* Update dashboard to version 0.12.4.
## 1.12.3
* Update dashboard to version 0.12.3.
## 1.12.2
* Update dashboard to version 0.12.2.
## 1.12.1
* Update dashboard to version 0.12.1.
## 1.12.0
* Update dashboard to version 0.12.0.
## 1.11.1
* Update dashboard to version 0.11.1.
## 1.11.0
* Update dashboard to version 0.11.0.
## 1.10.5
* Update dashboard to version 0.10.5.
## 1.10.4
* Update dashboard to version 0.10.4.
## 1.10.3
* Update dashboard to version 0.10.3.
## 1.10.2
* Update dashboard to version 0.10.2.
## 1.10.1
* Do not add explicit app roles for Stackspin core apps when creating the first
admin user.
* Update dashboard to version 0.10.1.
## 1.10.0
* Update dashboard to version 0.10.0.
## 1.9.2
* Update dashboard to version 0.9.2.
## 1.9.1
* Fix indentation of helm/yaml syntax in the split deployments, specifically in
the case of non-empty extraEnvVars.
* Update dashboard to version 0.9.1.
## 1.9.0
* Update dashboard to version 0.9.0.
* Switch to telepresence instead of home-grown proxy setup for hybrid
local/remote development environment.
## 1.8.4
* Update dashboard to version 0.8.4.
## 1.8.3
* Update dashboard to version 0.8.3.
## 1.8.2
* Update dashboard to version 0.8.2.
## 1.8.1
* Update dashboard to version 0.8.1.
## 1.8.0
* Update dashboard to version 0.8.0.
## 1.7.6
* Update dashboard to version 0.7.6.
## 1.7.5
* Update dashboard to version 0.7.5. * Update dashboard to version 0.7.5.
## [1.7.4] ## 1.7.4
* Update dashboard to version 0.7.4. * Update dashboard to version 0.7.4.
## [1.7.3] ## 1.7.3
- Fix kubernetes RBAC issue with new `info` api endpoint. - Fix kubernetes RBAC issue with new `info` api endpoint.
* Update dashboard to version 0.7.3. * Update dashboard to version 0.7.3.
## [1.7.2] ## 1.7.2
* Update dashboard to version 0.7.2. * Update dashboard to version 0.7.2.
## [1.7.1] ## 1.7.1
* Update dashboard to version 0.7.1. * Update dashboard to version 0.7.1.
* Only run the dashboard-initialize-user job on install, no longer on upgrade. * Only run the dashboard-initialize-user job on install, no longer on upgrade.
## [1.7.0] ## 1.7.0
* Update dashboard to version 0.7.0. * Update dashboard to version 0.7.0.
## [1.6.7] ## 1.6.7
* Increase a cypress timeout to avoid frequent false negatives when testing. * Increase a cypress timeout to avoid frequent false negatives when testing.
## [1.6.6] ## 1.6.6
* Add helm test using cypress. Only tests logging in for now. * Add helm test using cypress. Only tests logging in for now.
## [1.6.5] ## 1.6.5
* Update dashboard to version 0.6.5 * Update dashboard to version 0.6.5
## [1.6.4] ## 1.6.4
* Update dashboard to version 0.6.4 * Update dashboard to version 0.6.4
## [1.6.3] ## 1.6.3
* Update dashboard to version 0.6.3 * Update dashboard to version 0.6.3
## [1.6.2] ## 1.6.2
* Update dashboard to version 0.6.2 * Update dashboard to version 0.6.2
## [1.6.1] ## 1.6.1
* Update dashboard to version 0.6.1 * Update dashboard to version 0.6.1
## [1.5.2] ## 1.5.2
* Update dashboard to version 0.5.2 * Update dashboard to version 0.5.2
## [1.5.1] ## 1.5.1
* Update dashboard to version 0.5.1 * Update dashboard to version 0.5.1
## [1.5.0] ## 1.5.0
* Use dashboard backend container from new location * Use dashboard backend container from new location
* Use proper semver image tags * Use proper semver image tags
## [1.4.0] ## 1.4.0
* Fetch apps from Kubernetes back-end * Fetch apps from Kubernetes back-end
* Also fetch external apps * Also fetch external apps
* Only show installed apps on dashboard * Only show installed apps on dashboard
* Use correct URLs for apps on dashboard (not hardcoded ones) * Use correct URLs for apps on dashboard (not hardcoded ones)
## [1.2.3] ## 1.2.3
* Fix logging out of Hydra from the dashboard * Fix logging out of Hydra from the dashboard
## [1.2.2] ## 1.2.2
### Bug fixes ### Bug fixes
* Fix invalid reference format when image.digest is missing * Fix invalid reference format when image.digest is missing
see https://open.greenhost.net/stackspin/stackspin/-/merge_requests/1397#note_50785 see https://open.greenhost.net/stackspin/stackspin/-/merge_requests/1397#note_50785
## [1.2.0] ## 1.2.0
### Features ### Features
...@@ -93,7 +210,7 @@ ...@@ -93,7 +210,7 @@
* When an admin's dashboard access is changed to "User", their app access now * When an admin's dashboard access is changed to "User", their app access now
defaults to "user" defaults to "user"
## [1.1.0] ## 1.1.0
### Bug fixes ### Bug fixes
...@@ -104,7 +221,7 @@ ...@@ -104,7 +221,7 @@
* Dashboard admin users automatically have admin rights in all apps * Dashboard admin users automatically have admin rights in all apps
* App-specific rights for dashboard admin users are not editable * App-specific rights for dashboard admin users are not editable
## [1.0.5] ## 1.0.5
### Bug fixes ### Bug fixes
...@@ -115,7 +232,7 @@ ...@@ -115,7 +232,7 @@
* Update dashboard to v0.2.6 * Update dashboard to v0.2.6
* Update dashboard-backend to v0.2.7 * Update dashboard-backend to v0.2.7
## [1.0.4] ## 1.0.4
### Bug fixes ### Bug fixes
...@@ -125,13 +242,13 @@ ...@@ -125,13 +242,13 @@
* Update dashboard-backend to v0.2.6 * Update dashboard-backend to v0.2.6
## [1.0.3] ## 1.0.3
### Features ### Features
* Update frontend to 0.2.5 * Update frontend to 0.2.5
## [1.0.2] ## 1.0.2
### Features ### Features
...@@ -141,13 +258,13 @@ ...@@ -141,13 +258,13 @@
* Check if app exists before inserting into DB on initialization #64 * Check if app exists before inserting into DB on initialization #64
## [1.0.1] ## 1.0.1
### Bug fixes ### Bug fixes
* Resolve "App access role is not persistent" #63 * Resolve "App access role is not persistent" #63
## [1.0.0] ## 1.0.0
### Bug fixes ### Bug fixes
......
dependencies: dependencies:
- name: common - name: common
repository: https://charts.bitnami.com/bitnami repository: https://charts.bitnami.com/bitnami
version: 2.0.3 version: 2.14.1
digest: sha256:dfd07906c97f7fca7593af69d01f6f044e10a609a03057352142766a5caca6cd digest: sha256:31e157c847d806f07ddd0518316a205c315829105cd69ef5c79eff92e2f28967
generated: "2022-09-29T15:38:57.444746866+02:00" generated: "2024-01-30T13:59:56.425668471+01:00"
annotations: annotations:
category: Dashboard category: Dashboard
apiVersion: v2 apiVersion: v2
appVersion: 0.7.5 appVersion: 0.14.0
dependencies: dependencies:
- name: common - name: common
# https://artifacthub.io/packages/helm/bitnami/common # https://artifacthub.io/packages/helm/bitnami/common
...@@ -23,4 +23,4 @@ name: stackspin-dashboard ...@@ -23,4 +23,4 @@ name: stackspin-dashboard
sources: sources:
- https://open.greenhost.net/stackspin/dashboard/ - https://open.greenhost.net/stackspin/dashboard/
- https://open.greenhost.net/stackspin/dashboard-backend/ - https://open.greenhost.net/stackspin/dashboard-backend/
version: 1.7.5 version: 1.14.0
apiVersion: {{ template "common.capabilities.deployment.apiVersion" . }}
kind: Deployment
metadata:
name: {{ template "common.names.fullname" . }}-backend
labels: {{- include "common.labels.standard" . | nindent 4 }}
component: dashboard-backend
{{- if .Values.commonLabels }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
{{- end }}
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
spec:
replicas: {{ .Values.replicaCount }}
selector:
matchLabels:
component: dashboard-backend
{{- include "common.labels.matchLabels" . | nindent 6 }}
{{- if .Values.updateStrategy }}
strategy: {{- toYaml .Values.updateStrategy | nindent 4 }}
{{- end }}
template:
metadata:
labels:
component: dashboard-backend
{{- include "common.labels.standard" . | nindent 8 }}
{{- if .Values.podLabels }}
{{- include "common.tplvalues.render" (dict "value" .Values.podLabels "context" $) | nindent 8 }}
{{- end }}
{{- if .Values.podAnnotations }}
annotations: {{- include "common.tplvalues.render" (dict "value" .Values.podAnnotations "context" $) | nindent 8 }}
{{- end }}
spec:
{{- include "dashboard.imagePullSecrets" . | nindent 6 }}
{{- if .Values.hostAliases }}
hostAliases: {{- include "common.tplvalues.render" (dict "value" .Values.hostAliases "context" $) | nindent 8 }}
{{- end }}
{{- if .Values.affinity }}
affinity: {{- include "common.tplvalues.render" (dict "value" .Values.affinity "context" $) | nindent 8 }}
{{- else }}
affinity:
podAffinity: {{- include "common.affinities.pods" (dict "type" .Values.podAffinityPreset "context" $) | nindent 10 }}
podAntiAffinity: {{- include "common.affinities.pods" (dict "type" .Values.podAntiAffinityPreset "context" $) | nindent 10 }}
nodeAffinity: {{- include "common.affinities.nodes" (dict "type" .Values.nodeAffinityPreset.type "key" .Values.nodeAffinityPreset.key "values" .Values.nodeAffinityPreset.values) | nindent 10 }}
{{- end }}
{{- if .Values.nodeSelector }}
nodeSelector: {{- include "common.tplvalues.render" (dict "value" .Values.nodeSelector "context" $) | nindent 8 }}
{{- end }}
{{- if .Values.tolerations }}
tolerations: {{- include "common.tplvalues.render" (dict "value" .Values.tolerations "context" $) | nindent 8 }}
{{- end }}
serviceAccountName: {{ include "dashboard.serviceAccountName" . }}
securityContext: {{- toYaml .Values.podSecurityContext | nindent 8 }}
initContainers:
{{- if .Values.initContainers }}
{{- include "common.tplvalues.render" (dict "value" .Values.initContainers "context" $) | nindent 8 }}
{{- end }}
containers:
- name: backend
securityContext: {{- toYaml .Values.backend.containerSecurityContext | nindent 10 }}
image: {{ template "backend.image" . }}
imagePullPolicy: {{ .Values.image.pullPolicy | quote }}
{{- if .Values.backend.command }}
command: {{- include "common.tplvalues.render" (dict "value" .Values.backend.command "context" $) | nindent 10 }}
{{- end }}
{{- if .Values.backend.args }}
args: {{- include "common.tplvalues.render" (dict "value" .Values.backend.args "context" $) | nindent 10 }}
{{- end }}
env:
- name: DASHBOARD_PASSWORD
valueFrom:
secretKeyRef:
name: {{ include "backend.secretName" . }}
key: backend-password
- name: HYDRA_CLIENT_SECRET
valueFrom:
secretKeyRef:
name: {{ include "backend.secretName" . }}
key: oidc-client-secret
- name: KRATOS_URL
value: {{ .Values.backend.kratos.adminUrl }}
{{- if (include "backend.smtp.password.enabled" .) }}
- name: DASHBOARD_SMTP_PASSWORD
valueFrom:
secretKeyRef:
name: {{ include "backend.smtp.secretName" . }}
key: smtp-password
{{- end }}
{{- if .Values.backend.extraEnvVars }}
{{- include "common.tplvalues.render" (dict "value" .Values.backend.extraEnvVars "context" $) | nindent 8 }}
{{- end }}
envFrom:
- configMapRef:
name: {{ include "common.names.fullname" . }}
{{- if .Values.backend.extraEnvVarsCM }}
- configMapRef:
name: {{ .Values.backend.extraEnvVarsCM }}
{{- end }}
{{- if .Values.backend.extraEnvVarsSecret }}
- secretRef:
name: {{ .Values.backend.extraEnvVarsSecret }}
{{- end }}
ports:
- name: backend-http
containerPort: 5000
protocol: TCP
{{- if .Values.backend.livenessProbe.enabled }}
livenessProbe:
httpGet:
path: /
port: backend-http
initialDelaySeconds: {{ .Values.backend.livenessProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.backend.livenessProbe.periodSeconds }}
timeoutSeconds: {{ .Values.backend.livenessProbe.timeoutSeconds }}
successThreshold: {{ .Values.backend.livenessProbe.successThreshold }}
failureThreshold: {{ .Values.backend.livenessProbe.failureThreshold }}
{{- else if .Values.backend.customLivenessProbe }}
livenessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.backend.customLivenessProbe "context" $) | nindent 10 }}
{{- end }}
{{- if .Values.backend.readinessProbe.enabled }}
readinessProbe:
httpGet:
path: /
port: backend-http
initialDelaySeconds: {{ .Values.backend.readinessProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.backend.readinessProbe.periodSeconds }}
timeoutSeconds: {{ .Values.backend.readinessProbe.timeoutSeconds }}
successThreshold: {{ .Values.backend.readinessProbe.successThreshold }}
failureThreshold: {{ .Values.backend.readinessProbe.failureThreshold }}
{{- else if .Values.backend.customReadinessProbe }}
readinessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.backend.customReadinessProbe "context" $) | nindent 10 }}
{{- end }}
volumeMounts:
{{- if .Values.backend.extraVolumeMounts }}
{{- include "common.tplvalues.render" (dict "value" .Values.backend.extraVolumeMounts "context" $) | nindent 10 }}
{{- end }}
{{- if .Values.backend.resources }}
resources: {{- toYaml .Values.backend.resources | nindent 10 }}
{{- end }}
{{- if .Values.sidecars }}
{{- include "common.tplvalues.render" (dict "value" .Values.sidecars "context" $) | nindent 6 }}
{{- end }}
volumes:
{{- if .Values.extraVolumes }}
{{- include "common.tplvalues.render" (dict "value" .Values.extraVolumes "context" $) | nindent 8 }}
{{- end }}
...@@ -40,3 +40,4 @@ spec: ...@@ -40,3 +40,4 @@ spec:
{{- include "common.tplvalues.render" (dict "value" .Values.backend.service.extraPorts "context" $) | nindent 4 }} {{- include "common.tplvalues.render" (dict "value" .Values.backend.service.extraPorts "context" $) | nindent 4 }}
{{- end }} {{- end }}
selector: {{- include "common.labels.matchLabels" . | nindent 4 }} selector: {{- include "common.labels.matchLabels" . | nindent 4 }}
component: dashboard-backend
...@@ -18,6 +18,7 @@ data: ...@@ -18,6 +18,7 @@ data:
TOKEN_URL: {{ .Values.backend.oidc.tokenUrl }} TOKEN_URL: {{ .Values.backend.oidc.tokenUrl }}
KRATOS_PUBLIC_URL: {{ .Values.backend.kratos.publicUrl }} KRATOS_PUBLIC_URL: {{ .Values.backend.kratos.publicUrl }}
KRATOS_ADMIN_URL: {{ .Values.backend.kratos.adminUrl }} KRATOS_ADMIN_URL: {{ .Values.backend.kratos.adminUrl }}
KRATOS_WEBHOOK_SECRET: {{ .Values.backend.kratos.webhookSecret }}
HYDRA_PUBLIC_URL: {{ .Values.backend.oidc.baseUrl }} HYDRA_PUBLIC_URL: {{ .Values.backend.oidc.baseUrl }}
HYDRA_ADMIN_URL: {{ .Values.backend.hydra.adminUrl }} HYDRA_ADMIN_URL: {{ .Values.backend.hydra.adminUrl }}
DASHBOARD_URL: {{ .Values.backend.dashboardUrl }} DASHBOARD_URL: {{ .Values.backend.dashboardUrl }}
......
apiVersion: {{ template "common.capabilities.deployment.apiVersion" . }}
kind: Deployment
metadata:
name: {{ template "common.names.fullname" . }}
labels: {{- include "common.labels.standard" . | nindent 4 }}
component: dashboard
{{- if .Values.commonLabels }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
{{- end }}
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
spec:
replicas: {{ .Values.replicaCount }}
selector:
matchLabels: {{- include "common.labels.matchLabels" . | nindent 6 }}
component: dashboard
{{- if .Values.updateStrategy }}
strategy: {{- toYaml .Values.updateStrategy | nindent 4 }}
{{- end }}
template:
metadata:
labels: {{- include "common.labels.standard" . | nindent 8 }}
component: dashboard
{{- if .Values.podLabels }}
{{- include "common.tplvalues.render" (dict "value" .Values.podLabels "context" $) | nindent 8 }}
{{- end }}
{{- if .Values.podAnnotations }}
annotations: {{- include "common.tplvalues.render" (dict "value" .Values.podAnnotations "context" $) | nindent 8 }}
{{- end }}
spec:
{{- include "dashboard.imagePullSecrets" . | nindent 6 }}
{{- if .Values.hostAliases }}
hostAliases: {{- include "common.tplvalues.render" (dict "value" .Values.hostAliases "context" $) | nindent 8 }}
{{- end }}
{{- if .Values.affinity }}
affinity: {{- include "common.tplvalues.render" (dict "value" .Values.affinity "context" $) | nindent 8 }}
{{- else }}
affinity:
podAffinity: {{- include "common.affinities.pods" (dict "type" .Values.podAffinityPreset "context" $) | nindent 10 }}
podAntiAffinity: {{- include "common.affinities.pods" (dict "type" .Values.podAntiAffinityPreset "context" $) | nindent 10 }}
nodeAffinity: {{- include "common.affinities.nodes" (dict "type" .Values.nodeAffinityPreset.type "key" .Values.nodeAffinityPreset.key "values" .Values.nodeAffinityPreset.values) | nindent 10 }}
{{- end }}
{{- if .Values.nodeSelector }}
nodeSelector: {{- include "common.tplvalues.render" (dict "value" .Values.nodeSelector "context" $) | nindent 8 }}
{{- end }}
{{- if .Values.tolerations }}
tolerations: {{- include "common.tplvalues.render" (dict "value" .Values.tolerations "context" $) | nindent 8 }}
{{- end }}
serviceAccountName: {{ include "dashboard.serviceAccountName" . }}
securityContext: {{- toYaml .Values.podSecurityContext | nindent 8 }}
initContainers:
{{- if .Values.initContainers }}
{{- include "common.tplvalues.render" (dict "value" .Values.initContainers "context" $) | nindent 8 }}
{{- end }}
containers:
- name: dashboard
securityContext: {{- toYaml .Values.dashboard.containerSecurityContext | nindent 12 }}
image: {{ template "dashboard.image" . }}
imagePullPolicy: {{ .Values.image.pullPolicy | quote }}
{{- if .Values.dashboard.command }}
command: {{- include "common.tplvalues.render" (dict "value" .Values.dashboard.command "context" $) | nindent 12 }}
{{- end }}
{{- if .Values.dashboard.args }}
args: {{- include "common.tplvalues.render" (dict "value" .Values.dashboard.args "context" $) | nindent 12 }}
{{- end }}
env:
{{- if .Values.dashboard.extraEnvVars }}
{{- include "common.tplvalues.render" (dict "value" .Values.dashboard.extraEnvVars "context" $) | nindent 12 }}
{{- end }}
envFrom:
- configMapRef:
name: {{ include "common.names.fullname" . }}
{{- if .Values.dashboard.extraEnvVarsCM }}
- configMapRef:
name: {{ .Values.dashboard.extraEnvVarsCM }}
{{- end }}
{{- if .Values.dashboard.extraEnvVarsSecret }}
- secretRef:
name: {{ .Values.dashboard.extraEnvVarsSecret }}
{{- end }}
ports:
- name: dashboard-http
containerPort: 80
protocol: TCP
{{- if .Values.dashboard.livenessProbe.enabled }}
livenessProbe:
httpGet:
path: /
port: dashboard-http
initialDelaySeconds: {{ .Values.dashboard.livenessProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.dashboard.livenessProbe.periodSeconds }}
timeoutSeconds: {{ .Values.dashboard.livenessProbe.timeoutSeconds }}
successThreshold: {{ .Values.dashboard.livenessProbe.successThreshold }}
failureThreshold: {{ .Values.dashboard.livenessProbe.failureThreshold }}
{{- else if .Values.dashboard.customLivenessProbe }}
livenessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.dashboard.customLivenessProbe "context" $) | nindent 12 }}
{{- end }}
{{- if .Values.dashboard.readinessProbe.enabled }}
readinessProbe:
httpGet:
path: /
port: dashboard-http
initialDelaySeconds: {{ .Values.dashboard.readinessProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.dashboard.readinessProbe.periodSeconds }}
timeoutSeconds: {{ .Values.dashboard.readinessProbe.timeoutSeconds }}
successThreshold: {{ .Values.dashboard.readinessProbe.successThreshold }}
failureThreshold: {{ .Values.dashboard.readinessProbe.failureThreshold }}
{{- else if .Values.dashboard.customReadinessProbe }}
readinessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.dashboard.customReadinessProbe "context" $) | nindent 12 }}
{{- end }}
volumeMounts:
{{- if .Values.dashboard.extraVolumeMounts }}
{{- include "common.tplvalues.render" (dict "value" .Values.dashboard.extraVolumeMounts "context" $) | nindent 12 }}
{{- end }}
{{- if .Values.dashboard.resources }}
resources: {{- toYaml .Values.dashboard.resources | nindent 12 }}
{{- end }}
- name: backend
securityContext: {{- toYaml .Values.backend.containerSecurityContext | nindent 12 }}
image: {{ template "backend.image" . }}
imagePullPolicy: {{ .Values.image.pullPolicy | quote }}
{{- if .Values.backend.command }}
command: {{- include "common.tplvalues.render" (dict "value" .Values.backend.command "context" $) | nindent 12 }}
{{- end }}
{{- if .Values.backend.args }}
args: {{- include "common.tplvalues.render" (dict "value" .Values.backend.args "context" $) | nindent 12 }}
{{- end }}
env:
- name: DASHBOARD_PASSWORD
valueFrom:
secretKeyRef:
name: {{ include "backend.secretName" . }}
key: backend-password
- name: HYDRA_CLIENT_SECRET
valueFrom:
secretKeyRef:
name: {{ include "backend.secretName" . }}
key: oidc-client-secret
- name: KRATOS_URL
value: {{ .Values.backend.kratos.adminUrl }}
{{- if (include "backend.smtp.password.enabled" .) }}
- name: DASHBOARD_SMTP_PASSWORD
valueFrom:
secretKeyRef:
name: {{ include "backend.smtp.secretName" . }}
key: smtp-password
{{- end }}
{{- if .Values.backend.extraEnvVars }}
{{- include "common.tplvalues.render" (dict "value" .Values.backend.extraEnvVars "context" $) | nindent 12 }}
{{- end }}
envFrom:
- configMapRef:
name: {{ include "common.names.fullname" . }}
{{- if .Values.backend.extraEnvVarsCM }}
- configMapRef:
name: {{ .Values.backend.extraEnvVarsCM }}
{{- end }}
{{- if .Values.backend.extraEnvVarsSecret }}
- secretRef:
name: {{ .Values.backend.extraEnvVarsSecret }}
{{- end }}
ports:
- name: backend-http
containerPort: 5000
protocol: TCP
{{- if .Values.backend.livenessProbe.enabled }}
livenessProbe:
httpGet:
path: /
port: backend-http
initialDelaySeconds: {{ .Values.backend.livenessProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.backend.livenessProbe.periodSeconds }}
timeoutSeconds: {{ .Values.backend.livenessProbe.timeoutSeconds }}
successThreshold: {{ .Values.backend.livenessProbe.successThreshold }}
failureThreshold: {{ .Values.backend.livenessProbe.failureThreshold }}
{{- else if .Values.backend.customLivenessProbe }}
livenessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.backend.customLivenessProbe "context" $) | nindent 12 }}
{{- end }}
{{- if .Values.backend.readinessProbe.enabled }}
readinessProbe:
httpGet:
path: /
port: backend-http
initialDelaySeconds: {{ .Values.backend.readinessProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.backend.readinessProbe.periodSeconds }}
timeoutSeconds: {{ .Values.backend.readinessProbe.timeoutSeconds }}
successThreshold: {{ .Values.backend.readinessProbe.successThreshold }}
failureThreshold: {{ .Values.backend.readinessProbe.failureThreshold }}
{{- else if .Values.backend.customReadinessProbe }}
readinessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.backend.customReadinessProbe "context" $) | nindent 12 }}
{{- end }}
volumeMounts:
{{- if .Values.backend.extraVolumeMounts }}
{{- include "common.tplvalues.render" (dict "value" .Values.backend.extraVolumeMounts "context" $) | nindent 12 }}
{{- end }}
{{- if .Values.backend.resources }}
resources: {{- toYaml .Values.backend.resources | nindent 12 }}
{{- end }}
{{- if .Values.sidecars }}
{{- include "common.tplvalues.render" (dict "value" .Values.sidecars "context" $) | nindent 8 }}
{{- end }}
volumes:
{{- if .Values.extraVolumes }}
{{- include "common.tplvalues.render" (dict "value" .Values.extraVolumes "context" $) | nindent 8 }}
{{- end }}
apiVersion: {{ template "common.capabilities.deployment.apiVersion" . }}
kind: Deployment
metadata:
name: {{ template "common.names.fullname" . }}-frontend
labels:
component: dashboard-frontend
{{- include "common.labels.standard" . | nindent 4 }}
{{- if .Values.commonLabels }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
{{- end }}
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
spec:
replicas: {{ .Values.replicaCount }}
selector:
matchLabels: {{- include "common.labels.matchLabels" . | nindent 6 }}
component: dashboard-frontend
{{- if .Values.updateStrategy }}
strategy: {{- toYaml .Values.updateStrategy | nindent 4 }}
{{- end }}
template:
metadata:
labels:
component: dashboard-frontend
{{- include "common.labels.standard" . | nindent 8 }}
{{- if .Values.podLabels }}
{{- include "common.tplvalues.render" (dict "value" .Values.podLabels "context" $) | nindent 8 }}
{{- end }}
{{- if .Values.podAnnotations }}
annotations: {{- include "common.tplvalues.render" (dict "value" .Values.podAnnotations "context" $) | nindent 8 }}
{{- end }}
spec:
{{- include "dashboard.imagePullSecrets" . | nindent 6 }}
{{- if .Values.hostAliases }}
hostAliases: {{- include "common.tplvalues.render" (dict "value" .Values.hostAliases "context" $) | nindent 8 }}
{{- end }}
{{- if .Values.affinity }}
affinity: {{- include "common.tplvalues.render" (dict "value" .Values.affinity "context" $) | nindent 8 }}
{{- else }}
affinity:
podAffinity: {{- include "common.affinities.pods" (dict "type" .Values.podAffinityPreset "context" $) | nindent 10 }}
podAntiAffinity: {{- include "common.affinities.pods" (dict "type" .Values.podAntiAffinityPreset "context" $) | nindent 10 }}
nodeAffinity: {{- include "common.affinities.nodes" (dict "type" .Values.nodeAffinityPreset.type "key" .Values.nodeAffinityPreset.key "values" .Values.nodeAffinityPreset.values) | nindent 10 }}
{{- end }}
{{- if .Values.nodeSelector }}
nodeSelector: {{- include "common.tplvalues.render" (dict "value" .Values.nodeSelector "context" $) | nindent 8 }}
{{- end }}
{{- if .Values.tolerations }}
tolerations: {{- include "common.tplvalues.render" (dict "value" .Values.tolerations "context" $) | nindent 8 }}
{{- end }}
serviceAccountName: {{ include "dashboard.serviceAccountName" . }}
securityContext: {{- toYaml .Values.podSecurityContext | nindent 8 }}
initContainers:
{{- if .Values.initContainers }}
{{- include "common.tplvalues.render" (dict "value" .Values.initContainers "context" $) | nindent 8 }}
{{- end }}
containers:
- name: dashboard-frontend
securityContext: {{- toYaml .Values.dashboard.containerSecurityContext | nindent 10 }}
image: {{ template "dashboard.image" . }}
imagePullPolicy: {{ .Values.image.pullPolicy | quote }}
{{- if .Values.dashboard.command }}
command: {{- include "common.tplvalues.render" (dict "value" .Values.dashboard.command "context" $) | nindent 10 }}
{{- end }}
{{- if .Values.dashboard.args }}
args: {{- include "common.tplvalues.render" (dict "value" .Values.dashboard.args "context" $) | nindent 10 }}
{{- end }}
env:
{{- if .Values.dashboard.extraEnvVars }}
{{- include "common.tplvalues.render" (dict "value" .Values.dashboard.extraEnvVars "context" $) | nindent 10 }}
{{- end }}
envFrom:
- configMapRef:
name: {{ include "common.names.fullname" . }}
{{- if .Values.dashboard.extraEnvVarsCM }}
- configMapRef:
name: {{ .Values.dashboard.extraEnvVarsCM }}
{{- end }}
{{- if .Values.dashboard.extraEnvVarsSecret }}
- secretRef:
name: {{ .Values.dashboard.extraEnvVarsSecret }}
{{- end }}
ports:
- name: dashboard-http
containerPort: 80
protocol: TCP
{{- if .Values.dashboard.livenessProbe.enabled }}
livenessProbe:
httpGet:
path: /
port: dashboard-http
initialDelaySeconds: {{ .Values.dashboard.livenessProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.dashboard.livenessProbe.periodSeconds }}
timeoutSeconds: {{ .Values.dashboard.livenessProbe.timeoutSeconds }}
successThreshold: {{ .Values.dashboard.livenessProbe.successThreshold }}
failureThreshold: {{ .Values.dashboard.livenessProbe.failureThreshold }}
{{- else if .Values.dashboard.customLivenessProbe }}
livenessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.dashboard.customLivenessProbe "context" $) | nindent 10 }}
{{- end }}
{{- if .Values.dashboard.readinessProbe.enabled }}
readinessProbe:
httpGet:
path: /
port: dashboard-http
initialDelaySeconds: {{ .Values.dashboard.readinessProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.dashboard.readinessProbe.periodSeconds }}
timeoutSeconds: {{ .Values.dashboard.readinessProbe.timeoutSeconds }}
successThreshold: {{ .Values.dashboard.readinessProbe.successThreshold }}
failureThreshold: {{ .Values.dashboard.readinessProbe.failureThreshold }}
{{- else if .Values.dashboard.customReadinessProbe }}
readinessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.dashboard.customReadinessProbe "context" $) | nindent 10 }}
{{- end }}
volumeMounts:
{{- if .Values.overlay }}
- name: overlay
mountPath: /overlay
{{- end }}
{{- if .Values.dashboard.extraVolumeMounts }}
{{- include "common.tplvalues.render" (dict "value" .Values.dashboard.extraVolumeMounts "context" $) | nindent 10 }}
{{- end }}
{{- if .Values.dashboard.resources }}
resources: {{- toYaml .Values.dashboard.resources | nindent 10 }}
{{- end }}
{{- if .Values.overlay }}
- name: rsync
image: toelke158/docker-rsync@sha256:277adb5c4080fd0d93c455c9a5db08c595834055234e3948b79dddac5f983d80
volumeMounts:
- name: overlay
mountPath: /overlay
{{- end }}
{{- if .Values.sidecars }}
{{- include "common.tplvalues.render" (dict "value" .Values.sidecars "context" $) | nindent 6 }}
{{- end }}
volumes:
{{- if .Values.overlay }}
- name: overlay
persistentVolumeClaim:
claimName: {{ template "common.names.fullname" . }}-overlay
{{- end }}
{{- if .Values.extraVolumes }}
{{- include "common.tplvalues.render" (dict "value" .Values.extraVolumes "context" $) | nindent 8 }}
{{- end }}
...@@ -40,3 +40,4 @@ spec: ...@@ -40,3 +40,4 @@ spec:
{{- include "common.tplvalues.render" (dict "value" .Values.dashboard.service.extraPorts "context" $) | nindent 4 }} {{- include "common.tplvalues.render" (dict "value" .Values.dashboard.service.extraPorts "context" $) | nindent 4 }}
{{- end }} {{- end }}
selector: {{- include "common.labels.matchLabels" . | nindent 4 }} selector: {{- include "common.labels.matchLabels" . | nindent 4 }}
component: dashboard-frontend
...@@ -27,31 +27,26 @@ spec: ...@@ -27,31 +27,26 @@ spec:
image: {{ template "backend.image" . }} image: {{ template "backend.image" . }}
imagePullPolicy: {{ .Values.image.pullPolicy | quote }} imagePullPolicy: {{ .Values.image.pullPolicy | quote }}
envFrom: envFrom:
- configMapRef: - configMapRef:
name: {{ include "common.names.fullname" . }} name: {{ include "common.names.fullname" . }}
{{- if .Values.backend.extraEnvVarsCM }} {{- if .Values.backend.extraEnvVarsCM }}
- configMapRef: - configMapRef:
name: {{ .Values.backend.extraEnvVarsCM }} name: {{ .Values.backend.extraEnvVarsCM }}
{{- end }} {{- end }}
{{- if .Values.backend.extraEnvVarsSecret }} {{- if .Values.backend.extraEnvVarsSecret }}
- secretRef: - secretRef:
name: {{ .Values.backend.extraEnvVarsSecret }} name: {{ .Values.backend.extraEnvVarsSecret }}
{{- end }} {{- end }}
env: env:
- name: SETUP_EMAIL - name: SETUP_EMAIL
value: {{ .Values.backend.initialUser.email }} value: {{ .Values.backend.initialUser.email }}
- name: SETUP_PASSWORD - name: SETUP_PASSWORD
value: {{ .Values.backend.initialUser.password }} value: {{ .Values.backend.initialUser.password }}
- name: KRATOS_PUBLIC_URL - name: KRATOS_PUBLIC_URL
value: http://kratos-public:80 value: http://kratos-public:80
command: ["/bin/bash", "-c"] command: ["/bin/bash", "-c"]
args: args:
- flask cli user create $SETUP_EMAIL; - flask cli user create $SETUP_EMAIL;
flask cli user setpassword $SETUP_EMAIL $SETUP_PASSWORD; flask cli user setpassword $SETUP_EMAIL $SETUP_PASSWORD;
flask cli app create dashboard Dashboard; flask cli app create dashboard Dashboard;
flask cli user setrole $SETUP_EMAIL dashboard admin; flask cli user setrole $SETUP_EMAIL dashboard admin;
flask cli user setrole $SETUP_EMAIL nextcloud admin;
flask cli user setrole $SETUP_EMAIL wordpress admin;
flask cli user setrole $SETUP_EMAIL wekan admin;
flask cli user setrole $SETUP_EMAIL zulip admin;
flask cli user setrole $SETUP_EMAIL hedgedoc admin;
...@@ -22,6 +22,7 @@ rules: ...@@ -22,6 +22,7 @@ rules:
- get - get
- patch - patch
- create - create
- watch
- apiGroups: - apiGroups:
- helm.toolkit.fluxcd.io - helm.toolkit.fluxcd.io
resources: resources:
...@@ -46,6 +47,7 @@ rules: ...@@ -46,6 +47,7 @@ rules:
- configmaps - configmaps
verbs: verbs:
- list - list
- watch
- get - get
- patch - patch
- delete - delete
......
...@@ -68,7 +68,7 @@ dashboard: ...@@ -68,7 +68,7 @@ dashboard:
image: image:
registry: open.greenhost.net:4567 registry: open.greenhost.net:4567
repository: stackspin/dashboard/dashboard repository: stackspin/dashboard/dashboard
tag: 0.7.5 tag: 0.14.0
digest: "" digest: ""
## Optionally specify an array of imagePullSecrets. ## Optionally specify an array of imagePullSecrets.
## Secrets must be manually created in the namespace. ## Secrets must be manually created in the namespace.
...@@ -236,7 +236,7 @@ backend: ...@@ -236,7 +236,7 @@ backend:
image: image:
registry: open.greenhost.net:4567 registry: open.greenhost.net:4567
repository: stackspin/dashboard/dashboard-backend repository: stackspin/dashboard/dashboard-backend
tag: 0.7.5 tag: 0.14.0
digest: "" digest: ""
## Optionally specify an array of imagePullSecrets. ## Optionally specify an array of imagePullSecrets.
## Secrets must be manually created in the namespace. ## Secrets must be manually created in the namespace.
...@@ -660,8 +660,9 @@ ingress: ...@@ -660,8 +660,9 @@ ingress:
## ##
path: / path: /
## @param ingress.pathType Ingress path type ## @param ingress.pathType Ingress path type
## Should usually be ImplementationSpecific to allow regex matching.
## ##
pathType: Prefix pathType: ImplementationSpecific
## @param ingress.annotations Ingress annotations done as key:value pairs ## @param ingress.annotations Ingress annotations done as key:value pairs
## For a full list of possible ingress annotations, please see ## For a full list of possible ingress annotations, please see
## ref: https://github.com/kubernetes/ingress-nginx/blob/master/docs/user-guide/nginx-configuration/annotations.md ## ref: https://github.com/kubernetes/ingress-nginx/blob/master/docs/user-guide/nginx-configuration/annotations.md
...@@ -719,11 +720,16 @@ serviceAccount: ...@@ -719,11 +720,16 @@ serviceAccount:
## ##
annotations: {} annotations: {}
# If true, mount a pvc `dashboard-overlay` into the frontend pod. The
# contents will be served from the root frontend URL, overlaying any existing
# or non-existing files from the docker image.
overlay: false
tests: tests:
image: image:
registry: open.greenhost.net:4567 registry: open.greenhost.net:4567
repository: stackspin/dashboard/cypress-test repository: stackspin/dashboard/cypress-test
tag: 0.7.5 tag: 0.14.0
pullPolicy: IfNotPresent pullPolicy: IfNotPresent
credentials: credentials:
user: "" user: ""
......
...@@ -6,10 +6,19 @@ http { ...@@ -6,10 +6,19 @@ http {
listen [::]:80 default_server; listen [::]:80 default_server;
listen 80; listen 80;
root /usr/share/nginx/html;
include /etc/nginx/mime.types; include /etc/nginx/mime.types;
# First try to serve from the overlay, for custom styling, icons etc.
# The directory `/overlay` is expected to be mounted at runtime.
location / { location / {
root /overlay;
try_files $uri @docker;
}
# Default to serving from the directory with files copied into the
# docker image when building.
location @docker {
root /usr/share/nginx/html;
try_files $uri /index.html; try_files $uri /index.html;
} }
} }
......
#!/usr/bin/env bash
# TODO:
# * Check that KUBECONFIG is set, maybe load automatically like before?
# * env var for native/docker mode
# * env var for local (or remote) docker image name
set -u
# If KUBECONFIG is not set, we try to find a kubeconfig file in a standard
# location.
if ! [[ -v KUBECONFIG ]]
then
if [ -f "$(pwd)/kubeconfig/kube_config_cluster.yml" ]
then
export KUBECONFIG="$(pwd)/kubeconfig/kube_config_cluster.yml"
elif [ -f "$(pwd)/backend/kubeconfig/kube_config_cluster.yml" ]
then
export KUBECONFIG="$(pwd)/backend/kubeconfig/kube_config_cluster.yml"
fi
if [[ -v KUBECONFIG ]]
then
echo "Local kubeconfig file found."
echo "Setting KUBECONFIG=$KUBECONFIG"
fi
fi
TELEPRESENCE_NOT_RUNNING=0
TELEPRESENCE_NATIVE=1
TELEPRESENCE_DOCKER=2
telepresenceRunning() {
status=$(telepresence status | head -n 1)
if [ "${status#*: }" == "Running" ]
then
echo "telepresence running"
daemonType="${status%%:*}"
echo "daemon type: $daemonType"
if [ "${daemonType##* }" == "container" ]
then
echo "This seems to be a docker-mode daemon."
return $TELEPRESENCE_DOCKER
else
echo "This seems to be a native-mode daemon."
return $TELEPRESENCE_NATIVE
fi
elif [ "${status#*: }" == "Not running" ]
then
echo "telepresence not running"
return $TELEPRESENCE_NOT_RUNNING
else
echo "Unknown telepresence state: $status"
exit 2
fi
}
telepresenceDns() {
telepresence status | grep -i 'Remote IP' | awk -F': ' '{print $2}'
}
prepareDocker() {
telepresenceRunning
case $? in
$TELEPRESENCE_NOT_RUNNING)
echo "Starting telepresence daemon in docker mode."
telepresence connect -n stackspin --docker || exit 3
;;
$TELEPRESENCE_NATIVE)
echo "Error: you want to start a docker-mode intercept, but there is a native telepresence daemon running. This is not currently supported."
exit 3
;;
$TELEPRESENCE_DOCKER)
echo "telepresence daemon already running; connecting to it."
telepresence connect -n stackspin --docker || exit 3
;;
esac
}
prepareNative() {
telepresenceRunning
case $? in
$TELEPRESENCE_NOT_RUNNING)
echo "Starting telepresence daemon in native mode."
telepresence connect -n stackspin || exit 3
;;
$TELEPRESENCE_NATIVE)
echo "telepresence daemon already running; connecting to it."
telepresence connect -n stackspin || exit 3
;;
$TELEPRESENCE_DOCKER)
echo "Error: you want to start a native-mode intercept, but there is a docker telepresence daemon running. This is not currently supported."
exit 3
;;
esac
}
runBackend() {
echo "Running dashboard backend locally and connecting to cluster."
case $mode in
"native")
pushd backend > /dev/null
source venv/bin/activate
echo "Stopping any previous intercept for dashboard-backend..."
telepresence leave dashboard-backend
echo "Starting new intercept for dashboard-backend..."
telepresence intercept dashboard-backend --service=dashboard-backend --port 5000:80 --mount=true --replace --env-file=./backend.env -- env TELEPRESENCE_MODE=native FLASK_DEBUG=1 LOG_LEVEL=DEBUG flask run --reload
deactivate
popd > /dev/null
;;
"docker")
echo "Stopping any previous intercept for dashboard-backend..."
telepresence leave dashboard-backend
telepresence intercept dashboard-backend --service=dashboard-backend --port 5000:80 --mount=true --replace --docker-run -- --dns $(telepresenceDns) -e TELEPRESENCE_MODE=docker dashboard-backend:test
esac
}
runBackendShell() {
echo "Running shell in the local dashboard backend environment."
pushd backend > /dev/null
source venv/bin/activate
env $(xargs <backend.env) bash
deactivate
popd > /dev/null
}
runFrontend() {
echo "Running dashboard frontend locally and connecting to cluster."
case $mode in
"native")
pushd frontend > /dev/null
echo "Stopping any previous intercept for dashboard-frontend..."
telepresence leave dashboard-frontend
telepresence intercept dashboard-frontend --service=dashboard --port 3000:80 --mount=true -- npm start --watch --verbose
popd > /dev/null
;;
"docker")
echo "Stopping any previous intercept for dashboard-frontend..."
telepresence leave dashboard-frontend
telepresence intercept dashboard-frontend --service=dashboard --port 3000:80 --mount=true --docker-run -- dashboard-frontend:test
;;
esac
}
setupFrontend() {
pushd frontend > /dev/null
npm install
popd > /dev/null
}
setupBackend() {
pushd backend > /dev/null
if ! [ -d venv ]
then
python3 -m venv venv
fi
source venv/bin/activate
pip install -r requirements.txt
deactivate
popd > /dev/null
}
setupCluster() {
telepresence helm install -f telepresence-values.yaml
}
cleanCluster() {
telepresence uninstall --all-agents
helm uninstall -n ambassador traffic-manager
}
if [ $# -eq 0 ]
then
echo "No command given. See README.md for help."
exit 1
fi
if [ "$1" == "reset" ]
then
telepresence quit -s
kubectl rollout restart -n ambassador deploy/traffic-manager
exit 0
fi
if [ "$1" == "backend-shell" ]
then
runBackendShell
exit 0
fi
if [ $# -eq 1 ]
then
mode="native"
else
mode=$2
fi
if [ $# -eq 2 ] && [ "$1" == "cluster" ] && [ "$2" == "clean" ]
then
echo "Removing all development modifications from remote cluster..."
cleanCluster
exit 0
fi
if [ $# -eq 2 ] && [ "$2" == "pause" ]
then
case $1 in
"backend")
kubectl set image -n stackspin deploy/dashboard-backend backend=docker.io/rancher/mirrored-pause:3.6
exit 0
;;
*)
echo "Unknown pause command: $1 $2"
exit 4
esac
fi
if [ $# -eq 2 ] && [ "$2" == "setup" ]
then
case $1 in
"backend")
setupBackend
exit 0
;;
"frontend")
setupFrontend
exit 0
;;
"cluster")
setupCluster
exit 0
;;
*)
echo "Unknown setup command: $1 $2"
exit 4
esac
fi
case $mode in
"docker")
prepareDocker
;;
"native")
prepareNative
;;
*)
echo "Unknown mode (should be docker or native): $mode"
exit 4
esac
case $1 in
"backend")
runBackend
;;
"frontend")
runFrontend
;;
*)
echo "Unknown command: $1"
exit 4
esac
version: "3"
services:
frontend:
build:
context: ./frontend
env_file: ./frontend/local.env
volumes:
- ./frontend/src:/home/node/app/src
- ./frontend/public:/home/node/app/public
ports:
- "3000:3000"
command: "yarn start --watch --verbose"
stackspin_proxy:
image: nginx:1.25.1
ports:
- "8081:8081"
volumes:
- ./backend/proxy/default.conf:/etc/nginx/conf.d/default.conf
depends_on:
- kube_port_kratos_public
- flask_app
flask_app:
build:
context: ./backend
environment:
- FLASK_APP=app.py
- FLASK_ENV=development
- HYDRA_CLIENT_ID=dashboard-local
# Domain-specific URL settings
- HYDRA_AUTHORIZATION_BASE_URL=https://sso.$DOMAIN/oauth2/auth
- TOKEN_URL=https://sso.$DOMAIN/oauth2/token
- HYDRA_PUBLIC_URL=https://sso.$DOMAIN
# Local path overrides
- DASHBOARD_URL=http://localhost:3000
- KRATOS_PUBLIC_URL=http://stackspin_proxy:8081/kratos
- KRATOS_ADMIN_URL=http://kube_port_kratos_admin:8000
- HYDRA_ADMIN_URL=http://kube_port_hydra_admin:4445
- LOGIN_PANEL_URL=http://stackspin_proxy:8081/web/
- DATABASE_URL=mysql+pymysql://stackspin:$DATABASE_PASSWORD@kube_port_mysql/stackspin
# ENV variables that are deployment-specific
- SECRET_KEY=$FLASK_SECRET_KEY
- HYDRA_CLIENT_SECRET=$HYDRA_CLIENT_SECRET
- KUBECONFIG=/.kube/config
# Disable loading config from the service account
- LOAD_INCLUSTER_CONFIG=false
ports:
- "5000:5000"
user: "${KUBECTL_UID}:${KUBECTL_GID}"
volumes:
- ./backend:/app
- "$KUBECONFIG:/.kube/config"
depends_on:
- kube_port_mysql
entrypoint: ["bash", "-c", "flask run --host $$(hostname -i)"]
kube_port_kratos_admin:
image: bitnami/kubectl:1.27.4
user: "${KUBECTL_UID}:${KUBECTL_GID}"
expose:
- 8000
volumes:
- "$KUBECONFIG:/.kube/config"
entrypoint:
[
"bash",
"-c",
"kubectl -n stackspin port-forward --address $$(hostname -i) service/kratos-admin 8000:80",
]
kube_port_hydra_admin:
image: bitnami/kubectl:1.27.4
user: "${KUBECTL_UID}:${KUBECTL_GID}"
expose:
- 4445
volumes:
- "$KUBECONFIG:/.kube/config"
entrypoint:
[
"bash",
"-c",
"kubectl -n stackspin port-forward --address $$(hostname -i) service/hydra-admin 4445:4445",
]
kube_port_kratos_public:
image: bitnami/kubectl:1.27.4
user: "${KUBECTL_UID}:${KUBECTL_GID}"
ports:
- "8080:8080"
expose:
- 8080
volumes:
- "$KUBECONFIG:/.kube/config"
entrypoint:
[
"bash",
"-c",
"kubectl -n stackspin port-forward --address 0.0.0.0 service/kratos-public 8080:80",
]
kube_port_mysql:
image: bitnami/kubectl:1.27.4
user: "${KUBECTL_UID}:${KUBECTL_GID}"
expose:
- 3306
volumes:
- "$KUBECONFIG:/.kube/config"
entrypoint:
[
"bash",
"-c",
"kubectl -n stackspin port-forward --address $$(hostname -i) service/single-sign-on-database-mariadb 3306:3306",
]
...@@ -25,9 +25,11 @@ module.exports = { ...@@ -25,9 +25,11 @@ module.exports = {
project: './tsconfig.json', project: './tsconfig.json',
tsconfigRootDir: __dirname, tsconfigRootDir: __dirname,
}, },
root: true,
rules: { rules: {
'@typescript-eslint/explicit-function-return-type': 'off', '@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off', '@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/default-param-last': 'off',
'no-param-reassign': ['error', { props: false }], 'no-param-reassign': ['error', { props: false }],
'jsx-a11y/anchor-is-valid': 'off', 'jsx-a11y/anchor-is-valid': 'off',
'no-console': ['warn', { allow: ['debug', 'info', 'time', 'timeEnd', 'trace', 'error'] }], 'no-console': ['warn', { allow: ['debug', 'info', 'time', 'timeEnd', 'trace', 'error'] }],
......
FROM node:18 FROM node:20
WORKDIR /home/node/app WORKDIR /home/node/app
......
const webpack = require('webpack')
module.exports = { module.exports = {
style: { style: {
postcss: { postcssOptions: {
/* eslint-disable global-require */ /* eslint-disable global-require */
plugins: [require('tailwindcss'), require('autoprefixer')], plugins: [
require('tailwindcss'),
require('autoprefixer'),
],
},
},
webpack: {
configure: {
resolve: {
fallback: {
buffer: require.resolve('buffer'),
},
},
plugins: [
new webpack.ProvidePlugin({
Buffer: ['buffer', 'Buffer'],
}),
],
}, },
}, },
}; };
...@@ -3,28 +3,35 @@ ...@@ -3,28 +3,35 @@
"version": "0.1.1", "version": "0.1.1",
"private": true, "private": true,
"dependencies": { "dependencies": {
"@craco/craco": "^6.2.0", "@craco/craco": "^7.1.0",
"@headlessui/react": "^1.3.0", "@headlessui/react": "^1.3.0",
"@headlessui/tailwindcss": "^0.1.3", "@headlessui/tailwindcss": "^0.2.0",
"@heroicons/react": "^1.0.3", "@heroicons/react": "^1.0.3",
"@hookform/resolvers": "^2.6.1", "@hookform/resolvers": "^2.6.1",
"@tailwindcss/forms": "^0.3.3", "@tailwindcss/forms": "^0.5.7",
"@tailwindcss/typography": "^0.4.1", "@tailwindcss/typography": "^0.5.10",
"@tanstack/match-sorter-utils": "^8.8.4",
"@tanstack/react-table": "^8.9.3",
"@testing-library/jest-dom": "^5.11.4", "@testing-library/jest-dom": "^5.11.4",
"@testing-library/react": "^11.1.0", "@testing-library/react": "^11.1.0",
"@testing-library/user-event": "^12.1.10", "@testing-library/user-event": "^12.1.10",
"@types/jest": "^26.0.15", "@types/jest": "^26.0.15",
"@types/js-yaml": "^4.0.5", "@types/md5": "^2.3.5",
"@types/node": "^18.0.0", "@types/node": "^18.0.0",
"@types/react-dom": "^17.0.2", "@types/react-dom": "^17.0.2",
"@types/react-tag-autocomplete": "^6.3.3",
"axios": "^0.21.1", "axios": "^0.21.1",
"clsx": "^1.1.1", "clsx": "^1.1.1",
"dayjs": "^1.11.10",
"gray-matter": "^4.0.3", "gray-matter": "^4.0.3",
"lint-staged": "^11.1.1", "lint-staged": "^11.1.1",
"lodash": "^4.17.21", "lodash": "^4.17.21",
"md5": "^2.3.0",
"node-polyfill-webpack-plugin": "^3.0.0",
"prismjs": "^1.24.1", "prismjs": "^1.24.1",
"react": "17.0.2", "react": "17.0.2",
"react-dom": "^17.0.2", "react-dom": "^17.0.2",
"react-gauge-component": "^1.1.30",
"react-gravatar": "^2.6.3", "react-gravatar": "^2.6.3",
"react-helmet": "^6.1.0", "react-helmet": "^6.1.0",
"react-hook-form": "^7.22.0", "react-hook-form": "^7.22.0",
...@@ -33,17 +40,18 @@ ...@@ -33,17 +40,18 @@
"react-redux": "^7.2.4", "react-redux": "^7.2.4",
"react-router": "6.2.1", "react-router": "6.2.1",
"react-router-dom": "6.2.1", "react-router-dom": "6.2.1",
"react-scripts": "4.0.3", "react-scripts": "5.0.1",
"react-simple-code-editor": "^0.11.0", "react-simple-code-editor": "^0.11.0",
"react-table": "^7.7.0", "react-table": "^7.7.0",
"react-tag-autocomplete": "^6.3.0",
"redux": "^4.1.0", "redux": "^4.1.0",
"redux-persist": "^6.0.0", "redux-persist": "^6.0.0",
"redux-thunk": "^2.3.0", "redux-thunk": "^2.3.0",
"remark-gfm": "^3.0.1", "remark-gfm": "^3.0.1",
"tailwindcss": "npm:@tailwindcss/postcss7-compat",
"typescript": "^4.1.2", "typescript": "^4.1.2",
"urlcat": "^2.0.4", "urlcat": "^2.0.4",
"web-vitals": "^1.0.1", "web-vitals": "^1.0.1",
"yaml": "^2.3.4",
"yup": "^0.32.9" "yup": "^0.32.9"
}, },
"scripts": { "scripts": {
...@@ -60,45 +68,45 @@ ...@@ -60,45 +68,45 @@
"react-app/jest" "react-app/jest"
] ]
}, },
"browserslist": { "browserslist": [
"production": [ ">0.2%",
">0.2%", "not dead",
"not dead", "not op_mini all"
"not op_mini all" ],
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
},
"devDependencies": { "devDependencies": {
"@types/lodash": "^4.14.171", "@types/lodash": "^4.14.202",
"@types/prismjs": "^1.16.6", "@types/prismjs": "^1.16.6",
"@types/react": "17.0.2", "@types/react": "17.0.2",
"@types/react-gravatar": "^2.6.10", "@types/react-gravatar": "^2.6.10",
"@types/react-helmet": "^6.1.2", "@types/react-helmet": "^6.1.2",
"@types/react-router-dom": "^5.3.3", "@types/react-router-dom": "^5.3.3",
"@types/react-table": "^7.7.2", "@types/react-table": "^7.7.2",
"autoprefixer": "^9", "autoprefixer": "^9.8.8",
"dotenv": "^10.0.0", "dotenv": "^10.0.0",
"eslint-config-airbnb": "^18.2.1", "eslint-config-airbnb": "^19.0.4",
"eslint-config-airbnb-typescript": "^12.3.1", "eslint-config-airbnb-typescript": "^17.1.0",
"eslint-config-prettier": "^8.3.0", "eslint-config-prettier": "^9.1.0",
"eslint-plugin-cypress": "^2.11.3", "eslint-plugin-cypress": "^2.15.1",
"eslint-plugin-import": "^2.23.4", "eslint-plugin-jsx-a11y": "^6.8.0",
"eslint-plugin-jsx-a11y": "^6.4.1", "eslint-plugin-prettier": "^5.1.2",
"eslint-plugin-prettier": "^3.4.0", "eslint-plugin-promise": "^6.1.1",
"eslint-plugin-promise": "^5.1.0", "postcss": "^8.4.32",
"postcss": "^7", "postcss-flexbugs-fixes": "^5.0.2",
"postcss-preset-env": "^9.3.0",
"pre-commit": "^1.2.2", "pre-commit": "^1.2.2",
"prettier": "^2.3.2", "prettier": "^3.1.1",
"sass": "^1.36.0" "sass": "^1.36.0",
"tailwindcss": "^3.4.0"
}, },
"resolutions": { "resolutions": {
"@types/react": "17.0.2", "@types/react": "17.0.2",
"@types/react-dom": "17.0.2" "@types/react-dom": "17.0.2"
}, },
"overrides": {
"eslint-config-react-app": {
"@typescript-eslint/eslint-plugin": "6.17.0"
}
},
"pre-commit": "lint-staged", "pre-commit": "lint-staged",
"lint-staged": { "lint-staged": {
"*.{js,ts,tsx}": [ "*.{js,ts,tsx}": [
......