diff --git a/.gitlab/issue_templates/new_app.md b/.gitlab/issue_templates/new_app.md index c6b2a20d693770f4f37c367c6c8f91305825eb44..296f6852a342928eecbf37851652b0ce99f5b064 100644 --- a/.gitlab/issue_templates/new_app.md +++ b/.gitlab/issue_templates/new_app.md @@ -6,7 +6,6 @@ * [ ] Create new source if needed in `flux2/infrastructure/sources/APP.yaml` * [ ] Include `APP.yaml` in `flux2/infrastructure/sources/kustomization.yaml` * [ ] Add app secret: `install/templates/stackspin-APP-variables.yaml.jinja` -* Add `Kustomizations`: * [ ] `flux2/cluster/optional/APP/APP.yaml` * [ ] `flux2/apps/APP/kustomization.yaml` * [ ] If needed, add PVCs in `flux2/apps/APP/pvc.yaml` @@ -72,3 +71,8 @@ Add the following elements to `.gitlab-ci.yml`: * [ ] `docs/installation_instructions.rst` * [ ] `docs/testing_instructions.rst` * [ ] `docs/usage.rst` + +## Etc + +* [ ] Create follow-up issue with: + * [ ] Fine-tune CPU and mem limits (https://open.greenhost.net/stackspin/stackspin/-/ issues/1027) diff --git a/flux2/core/base/dashboard/dashboard-release.yaml b/flux2/core/base/dashboard/dashboard-release.yaml new file mode 100644 index 0000000000000000000000000000000000000000..2ee33f5b1a8fd7a8e556bc105f883dc0a72fd44d --- /dev/null +++ b/flux2/core/base/dashboard/dashboard-release.yaml @@ -0,0 +1,34 @@ +--- +apiVersion: helm.toolkit.fluxcd.io/v2beta1 +kind: HelmRelease +metadata: + name: dashboard +spec: + releaseName: dashboard + dependsOn: + - name: nginx + chart: + spec: + chart: ./deployment/helmchart/ + # NOTE: Change the GitRepository yaml file if you want a different version + sourceRef: + kind: GitRepository + name: dashboard + namespace: flux-system + interval: 1h + install: + remediation: + retries: 3 + timeout: 10m + valuesFrom: + - kind: ConfigMap + name: stackspin-dashboard-values + - kind: Secret + name: stackspin-dashboard-values + # Allow overriding values by ConfigMap or Secret + - kind: ConfigMap + name: stackspin-dashboard-override + optional: true + - kind: Secret + name: stackspin-dashboard-override + optional: true diff --git a/flux2/core/base/dashboard/dashboard-values-configmap.yaml b/flux2/core/base/dashboard/dashboard-values-configmap.yaml new file mode 100644 index 0000000000000000000000000000000000000000..c5070f6dfbfb209952271d6e84c512cc81e94843 --- /dev/null +++ b/flux2/core/base/dashboard/dashboard-values-configmap.yaml @@ -0,0 +1,49 @@ +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: stackspin-dashboard-values +data: + values.yaml: | + dashboard: + image: + registry: open.greenhost.net:4567 + repository: stackspin/dashboard/dashboard + tag: main + pullPolicy: Always + host: dashboard.${domain} + resources: + limits: + cpu: 20m + memory: 32Mi + requests: + cpu: 10m + memory: 16Mi + backend: + image: + registry: open.greenhost.net:4567 + repository: stackspin/dashboard-backend/dashboard-backend + tag: main + pullPolicy: Always + smtp: + enabled: ${outgoing_mail_enabled} + user: "${outgoing_mail_smtp_user}" + password: "${outgoing_mail_smtp_password}" + host: "${outgoing_mail_smtp_host}" + port: "${outgoing_mail_smtp_port}" + kratosUrl: single-sign-on-kratos-admin + resources: + limits: + cpu: 40m + memory: 256Mi + requests: + cpu: 20m + memory: 128Mi + ingress: + certManager: true + enabled: true + hostname: dashboard.${domain} + tls: + - hosts: + - dashboard.${domain} + secretName: stackspin-dashboard diff --git a/flux2/core/base/dashboard/dashboard-values-secret.yaml b/flux2/core/base/dashboard/dashboard-values-secret.yaml new file mode 100644 index 0000000000000000000000000000000000000000..310cc9236a19913e3b57d5727a2a914bfb40187c --- /dev/null +++ b/flux2/core/base/dashboard/dashboard-values-secret.yaml @@ -0,0 +1,9 @@ +apiVersion: v1 +kind: Secret +metadata: + name: stackspin-dashboard-values +data: + values.yaml: | + backend: + secretKey: ${backend_secretkey} + password: ${backend_password} diff --git a/flux2/core/base/dashboard/kustomization.yaml b/flux2/core/base/dashboard/kustomization.yaml new file mode 100644 index 0000000000000000000000000000000000000000..21e17cdce080d25d342c23812429d4cfd19afb5e --- /dev/null +++ b/flux2/core/base/dashboard/kustomization.yaml @@ -0,0 +1,8 @@ +--- +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +namespace: stackspin +resources: + - ./dashboard-release.yaml + - ./dashboard-values-configmap.yaml + - ./dashboard-values-secret.yaml diff --git a/flux2/infrastructure/sources/dashboard.yaml b/flux2/infrastructure/sources/dashboard.yaml index cee812b2585efa5fcea5dbf69eeb21887dbbd288..beaef5d7499e91cd578169b7a23c83c2e8f156ff 100644 --- a/flux2/infrastructure/sources/dashboard.yaml +++ b/flux2/infrastructure/sources/dashboard.yaml @@ -6,6 +6,6 @@ metadata: namespace: stackspin spec: interval: 1h - url: https://open.greenhost.net/stackspin/admin-frontend + url: https://open.greenhost.net/stackspin/dashboard ref: - commit: 25a82b08c85d7f2b64919efe1084dd2f847d91f1 + commit: f87849771b085eed5dee2e49ff8cfd720fc32c23 diff --git a/flux2/infrastructure/sources/kustomization.yaml b/flux2/infrastructure/sources/kustomization.yaml index c86eee7c82c3247b740e2aa36d3d6ec9e0c962a7..8832ade338a1dc6120a91c287267970916ee9741 100644 --- a/flux2/infrastructure/sources/kustomization.yaml +++ b/flux2/infrastructure/sources/kustomization.yaml @@ -17,3 +17,4 @@ resources: - wikimedia.yaml - wordpress.yaml - zulip.yaml + - dashboard.yaml diff --git a/install/templates/stackspin-dashboard-variables.yaml.jinja b/install/templates/stackspin-dashboard-variables.yaml.jinja new file mode 100644 index 0000000000000000000000000000000000000000..11b72cb83fd395f160b722d64be7ddef1a7b7595 --- /dev/null +++ b/install/templates/stackspin-dashboard-variables.yaml.jinja @@ -0,0 +1,7 @@ +apiVersion: v1 +kind: Secret +metadata: + name: stackspin-wekan-variables +data: + backend_secretkey: "{{ 32 | generate_password | b64encode }}" + backend_password: "{{ 32 | generate_password | b64encode }}"