From 067fa754f1892d70afa2a1314c791210dd389fa9 Mon Sep 17 00:00:00 2001 From: Andrej Petras Date: Thu, 1 Feb 2024 19:01:51 +0100 Subject: [PATCH] feat: migration tkit.org --- templates/operator-database.yaml | 2 +- templates/operator-microfrontend.yaml | 32 +++++++++++++++++++++ templates/operator-permission.yaml | 4 ++- values.yaml | 40 +++++++++++++++++++++++++++ 4 files changed, 76 insertions(+), 2 deletions(-) create mode 100644 templates/operator-microfrontend.yaml diff --git a/templates/operator-database.yaml b/templates/operator-database.yaml index 8eaf333..5024f9a 100644 --- a/templates/operator-database.yaml +++ b/templates/operator-database.yaml @@ -1,6 +1,6 @@ {{- if .Values.db.enabled }} {{ if .Values.db.operator }} -apiVersion: onecx.github.io/v1 +apiVersion: onecx.tkit.org/v1 kind: Database metadata: name: {{ template "app.fullname" $ }}-db diff --git a/templates/operator-microfrontend.yaml b/templates/operator-microfrontend.yaml new file mode 100644 index 0000000..6a53ac8 --- /dev/null +++ b/templates/operator-microfrontend.yaml @@ -0,0 +1,32 @@ +{{ if .Values.operator.microfrontend.enabled }} +apiVersion: onecx.tkit.org/v1 +kind: Microfrontend +metadata: + name: {{ include "app.fullname" . }} + labels: + app: {{ include "app.fullname" . }} +{{ include "app.labels.common" $ | indent 4 }} +spec: + appId: {{ .Values.operator.microfrontend.spec.appId | default (include "app.id" .) }} + appName: {{ .Values.operator.microfrontend.spec.appName | default (include "app.fullname" .) }} + appVersion: {{ template "app.version" $ }} + classifications: {{ .Values.operator.microfrontend.spec.classifications }} + contact: {{ .Values.operator.microfrontend.spec.contact }} + description: {{ .Values.operator.microfrontend.spec.description }} + exposedModule: {{ .Values.operator.microfrontend.spec.exposedModule }} + iconName: {{ .Values.operator.microfrontend.spec.iconName }} + note: {{ .Values.operator.microfrontend.spec.note }} + tagName: {{ .Values.operator.microfrontend.spec.tagName }} + remoteName: {{ .Values.operator.microfrontend.spec.remoteName }} + productName: {{ .Values.operator.microfrontend.spec.productName | default .Release.Name }} + remoteBaseUrl: {{ .Values.operator.microfrontend.spec.remoteBaseUrl | default .Values.routing.path }} + remoteEntry: {{ .Values.operator.microfrontend.spec.remoteBaseUrl | default .Values.routing.path }}{{ .Values.operator.microfrontend.entrySuffix }} + technology: {{ .Values.operator.microfrontend.spec.technology }} + {{ if (.Values.operator.microfrontend.spec.endpoints) }} + endpoints: + {{- range $item := .Values.operator.microfrontend.spec.endpoints }} + - name: {{ $item.name }} + path: {{ $item.path }} + {{- end }} + {{- end }} +{{- end }} diff --git a/templates/operator-permission.yaml b/templates/operator-permission.yaml index 227a573..7465dd7 100644 --- a/templates/operator-permission.yaml +++ b/templates/operator-permission.yaml @@ -1,5 +1,5 @@ {{ if .Values.operator.permission.enabled }} -apiVersion: onecx.github.io/v1 +apiVersion: onecx.tkit.org/v1 kind: Permission metadata: name: {{ include "app.fullname" . }} @@ -8,5 +8,7 @@ metadata: {{ include "app.labels.common" $ | indent 4 }} spec: appId: {{ .Values.operator.permission.spec.appId | default (include "app.fullname" .) }} + name: {{ .Values.operator.permission.spec.name | default (include "app.fullname" .) }} + description: appId: {{ .Values.operator.permission.spec.description | default (include "app.fullname" .) }} permissions: {{ if .Values.operator.permission.spec.permissions }}{{ .Values.operator.permission.spec.permissions | toYaml | nindent 4 }}{{- end }} {{- end }} diff --git a/values.yaml b/values.yaml index ccc04bd..0d45fce 100644 --- a/values.yaml +++ b/values.yaml @@ -164,6 +164,10 @@ operator: spec: # default deployment name (release_name-name) appId: + # application name (release_name-name) + name: + # application description (release_name-name) + description: # map of permissions # resource: # action: description @@ -193,3 +197,39 @@ operator: roles: # path to the realms JSON file realms: + + # microfrontend + microfrontend: + # enable or disable configuration for operator + enabled: false + # default remote entry path suffix + entrySuffix: remoteEntry.js + + # definnition + spec: + description: change-me + exposedModule: change-me + iconName: + note: change-me + remoteName: + tagName: + # list of strings + classifications: [] + # list of name and path + # - name: + # path: + endpoints: + # technology is free text + technology: ANGULAR + # contact email + contact: onecx@1000kit.org + # default is app.routing.path + remoteBaseUrl: + # default is app.routing.path + entrySuffix + remoteEntry: + # default release name (product name) + productName: + # default deployment name (release_name-name or appId) + appId: + # default deployment name (release_name-name) + appName: