Skip to content

Commit 329efff

Browse files
committed
feat: add ui-operator addon structure
fix: remove trailing whitespace and ensure consistent formatting in ui-operator addon files fix: update ui-operator deployment and related configurations review: replace template file with direct manifests.sls for ui-operator deployment refactor: remove unnecessary shebang and restructure namespace definition for ui-operator fix: remove trailing whitespace in manifests.sls for ui-operator addon
1 parent 8c10bf8 commit 329efff

5 files changed

Lines changed: 98 additions & 0 deletions

File tree

buildchain/buildchain/salt_tree.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -409,6 +409,10 @@ def task(self) -> types.TaskDict:
409409
},
410410
),
411411
Path("salt/metalk8s/addons/ui/post-upgrade.sls"),
412+
Path("salt/metalk8s/addons/ui-operator/deployed/init.sls"),
413+
Path("salt/metalk8s/addons/ui-operator/deployed/manifests.sls"),
414+
Path("salt/metalk8s/addons/ui-operator/deployed/namespace.sls"),
415+
Path("salt/metalk8s/addons/ui-operator/post-upgrade.sls"),
412416
Path("salt/metalk8s/addons/solutions/deployed/configmap.sls"),
413417
Path("salt/metalk8s/addons/solutions/deployed/init.sls"),
414418
Path("salt/metalk8s/addons/solutions/deployed/namespace.sls"),
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
include:
2+
- .manifests
3+
4+
Wait for the UI Operator to be Ready:
5+
test.configurable_test_state:
6+
- changes: False
7+
- result: __slot__:salt:metalk8s_kubernetes.check_object_ready(
8+
apiVersion=apps/v1, kind=Deployment,
9+
name=ui-operator, namespace=metalk8s-ui)
10+
- comment: Wait for the UI Operator to be Ready
11+
- retry:
12+
attempts: 30
13+
- require:
14+
- sls: metalk8s.addons.ui-operator.deployed.manifests
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
{%- from "metalk8s/repo/macro.sls" import build_image_name with context %}
2+
3+
include:
4+
- .namespace
5+
6+
{%- set ui_operator_image = build_image_name('ui-operator') %}
7+
8+
Deploy UI Operator:
9+
metalk8s_kubernetes.object_present:
10+
- name: ui-operator
11+
- namespace: metalk8s-ui
12+
- kind: Deployment
13+
- apiVersion: apps/v1
14+
- definition:
15+
metadata:
16+
name: ui-operator
17+
namespace: metalk8s-ui
18+
labels:
19+
app.kubernetes.io/name: ui-operator
20+
app.kubernetes.io/managed-by: salt
21+
app.kubernetes.io/part-of: metalk8s
22+
spec:
23+
replicas: 1
24+
selector:
25+
matchLabels:
26+
app.kubernetes.io/name: ui-operator
27+
template:
28+
metadata:
29+
labels:
30+
app.kubernetes.io/name: ui-operator
31+
spec:
32+
containers:
33+
- name: ui-operator
34+
image: {{ ui_operator_image }}
35+
ports:
36+
- containerPort: 8081
37+
name: health
38+
livenessProbe:
39+
httpGet:
40+
path: /healthz
41+
port: 8081
42+
initialDelaySeconds: 15
43+
periodSeconds: 20
44+
readinessProbe:
45+
httpGet:
46+
path: /readyz
47+
port: 8081
48+
initialDelaySeconds: 5
49+
periodSeconds: 10
50+
resources:
51+
requests:
52+
cpu: "10m"
53+
memory: "64Mi"
54+
limits:
55+
cpu: "500m"
56+
memory: "128Mi"
57+
securityContext:
58+
allowPrivilegeEscalation: false
59+
capabilities:
60+
drop:
61+
- ALL
62+
securityContext:
63+
runAsNonRoot: true
64+
terminationGracePeriodSeconds: 10
65+
- require:
66+
- sls: metalk8s.addons.ui-operator.deployed.namespace
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
Create UI Operator Namespace:
2+
metalk8s_kubernetes.object_present:
3+
- name: metalk8s-ui
4+
- kind: Namespace
5+
- apiVersion: v1
6+
- definition:
7+
metadata:
8+
name: metalk8s-ui
9+
labels:
10+
app.kubernetes.io/managed-by: salt
11+
app.kubernetes.io/part-of: metalk8s
12+
heritage: metalk8s
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
include:
2+
- .deployed

0 commit comments

Comments
 (0)