Skip to content

Commit

Permalink
feat: add slot resource
Browse files Browse the repository at this point in the history
  • Loading branch information
andrejpetras committed Apr 22, 2024
1 parent d55cc41 commit 5c6869f
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 0 deletions.
18 changes: 18 additions & 0 deletions templates/operator-slot.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{{ if .Values.operator.slot.enabled }}
{{- range $item_name, $item_spec := .Values.operator.slot.specs }}
---
apiVersion: onecx.tkit.org/v1
kind: Slot
metadata:
name: {{ include "app-angular.fullname" $ }}-{{ $item_name }}
labels:
app: {{ include "app-angular.fullname" $ }}
{{ include "app-angular.labels.common" $ | indent 4 }}
spec:
productName: {{ $item_spec.productName | default (include "app-angular.product.name" $) }}
appId: {{ $item_spec.appId | default (include "app-angular.id" $) }}
name: {{ $item_spec.name | default $item_name }}
description: {{ $item_spec.description | default $.Values.operator.slot.spec.description }}
deprecated: {{ $item_spec.deprecated | default $.Values.operator.slot.spec.deprecated }}
{{- end }}
{{- end }}
15 changes: 15 additions & 0 deletions tests/slots.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
operator:
slot:
enabled: true
specs:
menu:
name: "menu"
horizontal:
name: "horizontalMenu"
headerRight:
name: "headerRight"
subHeader:
name: "subHeader"
spec:
description: "OneCX Product Store UI 2"
deprecated: false
17 changes: 17 additions & 0 deletions values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,23 @@ operator:
# action: description
permissions:

# slot
slot:
# enable or disable configuration for operator
enabled: false

# map of <name, spec> of mfe spec ( see spec )
specs:

# definnition and default values for the list of spec 'specs'
spec:
# name of the slot ( ref. id to sour code of the app)
name:
# deprecated true | false
deprecated: false
# description text
description: change-me

# microfrontend
microfrontend:
# enable or disable configuration for operator
Expand Down

0 comments on commit 5c6869f

Please sign in to comment.