Skip to content

Commit 660a261

Browse files
committed
Merge branch 'dev' into main
2 parents e326f7f + 0ebafb6 commit 660a261

File tree

9 files changed

+212
-93
lines changed

9 files changed

+212
-93
lines changed

Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,6 @@ ADD entrypoint.sh /
1414

1515
ADD ./src/*.py /src/
1616

17+
ADD ./src/templates /src/templates
18+
1719
CMD /entrypoint.sh

init/peering.yaml

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
1-
# This file is for Kubernetes >= 1.16.
2-
# For Kubernetes <= 1.15, use peering-v1beta1.yaml.
31
---
42
apiVersion: apiextensions.k8s.io/v1
53
kind: CustomResourceDefinition
64
metadata:
7-
name: clusterkopfpeerings.zalando.org
5+
name: clusterkopfpeerings.kopf.dev
86
spec:
97
scope: Cluster
10-
group: zalando.org
8+
group: kopf.dev
119
names:
1210
kind: ClusterKopfPeering
1311
plural: clusterkopfpeerings
@@ -27,10 +25,10 @@ spec:
2725
apiVersion: apiextensions.k8s.io/v1
2826
kind: CustomResourceDefinition
2927
metadata:
30-
name: kopfpeerings.zalando.org
28+
name: kopfpeerings.kopf.dev
3129
spec:
3230
scope: Namespaced
33-
group: zalando.org
31+
group: kopf.dev
3432
names:
3533
kind: KopfPeering
3634
plural: kopfpeerings
@@ -47,14 +45,14 @@ spec:
4745
type: object
4846
x-kubernetes-preserve-unknown-fields: true
4947
---
50-
apiVersion: zalando.org/v1
48+
apiVersion: kopf.dev/v1
5149
kind: ClusterKopfPeering
5250
metadata:
5351
name: default
5452
---
55-
apiVersion: zalando.org/v1
53+
apiVersion: kopf.dev/v1
5654
kind: KopfPeering
5755
metadata:
5856
namespace: default
5957
name: default
60-
---
58+
---

manifests/dev/deployment.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ spec:
1717
serviceAccountName: enonic-op-dev-account
1818
containers:
1919
- name: operator
20-
image: "localhost:5000/enonic-op:latest"
20+
image: daviptrs/enonic-operator-k8s:dev
2121
imagePullPolicy: Always
2222
env:
2323
- name: DEBUG

manifests/dev/rbac.yaml

Lines changed: 26 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,31 +12,47 @@ metadata:
1212
rules:
1313

1414
# Framework: knowing which other operators are running (i.e. peering).
15-
- apiGroups: [zalando.org]
15+
- apiGroups: [kopf.dev]
1616
resources: [clusterkopfpeerings]
1717
verbs: [list, watch, patch, get]
18+
19+
# Framework: runtime observation of namespaces & CRDs (addition/deletion).
1820
- apiGroups: [apiextensions.k8s.io]
1921
resources: [customresourcedefinitions]
20-
verbs: [list, get]
22+
verbs: [list, watch]
23+
- apiGroups: [""]
24+
resources: [namespaces]
25+
verbs: [list, watch]
2126

2227
# Framework: posting the events about the handlers progress/errors.
23-
- apiGroups: [events.k8s.io]
24-
resources: [events]
25-
verbs: [create]
26-
- apiGroups: [""]
28+
- apiGroups: ["", "events.k8s.io"]
2729
resources: [events]
2830
verbs: [create]
2931

30-
# Application: read-only access for watching cluster-wide.
32+
# Framework: admission webhook configuration management.
33+
- apiGroups: [admissionregistration.k8s.io/v1, admissionregistration.k8s.io/v1beta1]
34+
resources: [validatingwebhookconfigurations, mutatingwebhookconfigurations]
35+
verbs: [create, patch]
36+
3137
- apiGroups: [""]
3238
resources: ["pods"]
33-
verbs: [list, watch, patch, create, delete, update]
39+
verbs: [get, list, watch, create, delete]
40+
41+
- apiGroups: ["kopf.enonic"]
42+
resources: ["enonicxpapps"]
43+
verbs: [get, list, watch, patch, update]
44+
45+
- apiGroups: ["batch", "extensions"]
46+
resources: ["jobs"]
47+
verbs: [get, list, watch, patch, create, delete, update]
48+
3449
- apiGroups: ["apps"]
3550
resources: ["statefulsets"]
36-
verbs: [get, list, watch, patch, create, delete, update]
51+
verbs: [get, list, watch, patch]
52+
3753
- apiGroups: ["apps"]
3854
resources: ["statefulsets/status"]
39-
verbs: [get, list, watch, patch, update, create, delete]
55+
verbs: [get, list, watch, patch]
4056
---
4157
apiVersion: rbac.authorization.k8s.io/v1beta1
4258
kind: ClusterRoleBinding

manifests/manifest.yaml

Lines changed: 73 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,35 +3,54 @@ apiVersion: v1
33
kind: ServiceAccount
44
metadata:
55
namespace: default
6-
name: enonic-operator-account
6+
name: enonic-op-account
77

88
---
99
apiVersion: rbac.authorization.k8s.io/v1beta1
1010
kind: ClusterRole
1111
metadata:
12-
name: enonic-operator-clusterrole
12+
name: enonic-op-role-cluster
1313
rules:
1414

1515
# Framework: knowing which other operators are running (i.e. peering).
16-
- apiGroups: [zalando.org]
16+
- apiGroups: [kopf.dev]
1717
resources: [clusterkopfpeerings]
1818
verbs: [list, watch, patch, get]
19+
20+
# Framework: runtime observation of namespaces & CRDs (addition/deletion).
1921
- apiGroups: [apiextensions.k8s.io]
2022
resources: [customresourcedefinitions]
21-
verbs: [list, get]
23+
verbs: [list, watch]
24+
- apiGroups: [""]
25+
resources: [namespaces]
26+
verbs: [list, watch]
2227

2328
# Framework: posting the events about the handlers progress/errors.
24-
- apiGroups: [events.k8s.io]
29+
- apiGroups: ["", "events.k8s.io"]
2530
resources: [events]
2631
verbs: [create]
32+
33+
# Framework: admission webhook configuration management.
34+
- apiGroups: [admissionregistration.k8s.io/v1, admissionregistration.k8s.io/v1beta1]
35+
resources: [validatingwebhookconfigurations, mutatingwebhookconfigurations]
36+
verbs: [create, patch]
37+
2738
- apiGroups: [""]
28-
resources: [events]
29-
verbs: [create]
39+
resources: ["pods"]
40+
verbs: [get, list, watch, create, delete]
41+
42+
- apiGroups: ["kopf.enonic"]
43+
resources: ["enonicxpapps"]
44+
verbs: [get, list, watch, patch, update]
45+
46+
- apiGroups: ["batch", "extensions"]
47+
resources: ["jobs"]
48+
verbs: [get, list, watch, patch, create, delete, update]
3049

31-
# Application: access for management cluster-wide.
3250
- apiGroups: ["apps"]
3351
resources: ["statefulsets"]
3452
verbs: [get, list, watch, patch]
53+
3554
- apiGroups: ["apps"]
3655
resources: ["statefulsets/status"]
3756
verbs: [get, list, watch, patch]
@@ -40,16 +59,59 @@ rules:
4059
apiVersion: rbac.authorization.k8s.io/v1beta1
4160
kind: ClusterRoleBinding
4261
metadata:
43-
name: enonic-operator-bind
62+
name: enonic-op-rolebinding-cluster
4463
roleRef:
4564
apiGroup: rbac.authorization.k8s.io
4665
kind: ClusterRole
47-
name: enonic-operator-clusterrole
66+
name: enonic-op-role-cluster
4867
subjects:
4968
- kind: ServiceAccount
50-
name: enonic-operator-account
69+
name: enonic-op-account
5170
namespace: default
5271

72+
---
73+
apiVersion: apiextensions.k8s.io/v1
74+
kind: CustomResourceDefinition
75+
metadata:
76+
name: enonicxpapps.kopf.enonic
77+
spec:
78+
scope: Namespaced
79+
group: kopf.enonic
80+
names:
81+
kind: EnonicXpApp
82+
plural: enonicxpapps
83+
singular: enonicxpapp
84+
shortNames:
85+
- xpapp
86+
- xpapps
87+
- exas
88+
- exa
89+
- xapp
90+
- xapps
91+
versions:
92+
- name: v1
93+
served: true
94+
storage: true
95+
schema:
96+
openAPIV3Schema:
97+
type: object
98+
properties:
99+
spec:
100+
type: object
101+
x-kubernetes-preserve-unknown-fields: true
102+
status:
103+
type: object
104+
x-kubernetes-preserve-unknown-fields: true
105+
additionalPrinterColumns:
106+
- name: Latest Jar
107+
type: string
108+
jsonPath: .spec.object.name
109+
description: Latest jar file that was tried to be installed.
110+
- name: Status
111+
type: string
112+
jsonPath: .status.xp_app_handler/spec
113+
description: Jar latest installation status
114+
53115
---
54116
apiVersion: apps/v1
55117
kind: Deployment

push_dev

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash
22

3-
docker build . -f Dockerfile -t localhost:5000/enonic-op:latest
4-
docker push localhost:5000/enonic-op:latest
3+
docker build . -f Dockerfile -t daviptrs/enonic-operator-k8s:dev --build-arg VERSION_TAG=dev
4+
docker push daviptrs/enonic-operator-k8s:dev
55

66
kubectl rollout restart deployment enonic-op-dev

sidecar-tool/push_alpha

Lines changed: 0 additions & 3 deletions
This file was deleted.

0 commit comments

Comments
 (0)