Skip to content

Commit dfc4933

Browse files
committed
reconcile routes
1 parent 669e6e9 commit dfc4933

14 files changed

+836
-215
lines changed

Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ RUN go mod download
1313
COPY main.go main.go
1414
COPY api/ api/
1515
COPY controllers/ controllers/
16+
COPY pkg/ pkg/
1617

1718
# Build
1819
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -o manager main.go

PROJECT

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,9 @@ resources:
1616
kind: EncryptedDomain
1717
path: github.com/NautiluX/mockstruct/api/v1beta1
1818
version: v1beta1
19+
- controller: true
20+
domain: operatingopenshift.org
21+
group: route.openshift.io
22+
kind: Route
23+
version: v1
1924
version: "3"

api/v1beta1/encrypteddomain_types.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,14 @@ type EncryptedDomainSpec struct {
4343

4444
// EncryptedDomainStatus defines the observed state of EncryptedDomain
4545
type EncryptedDomainStatus struct {
46-
GeneratedCertificates []GeneratedCertificate `json:"generatedCertificate,omitempty"`
47-
PrivateKey string `json:"privateKey,omitempty"`
46+
GeneratedCertificates map[string]GeneratedCertificate `json:"generatedCertificate,omitempty"`
47+
PrivateKey string `json:"privateKey,omitempty"`
4848
}
4949

5050
type GeneratedCertificate struct {
5151
Hostname string `json:"hostname,omitempty"`
52-
Certificate []byte `json:"certificate,omitempty"`
52+
Certificate string `json:"certificate,omitempty"`
53+
Key string `json:"key,omitempty"`
5354
}
5455

5556
//+kubebuilder:object:root=true

api/v1beta1/zz_generated.deepcopy.go

Lines changed: 3 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

config/crd/bases/letsencrypt.operatingopenshift.org_encrypteddomains.yaml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,15 +54,16 @@ spec:
5454
description: EncryptedDomainStatus defines the observed state of EncryptedDomain
5555
properties:
5656
generatedCertificate:
57-
items:
57+
additionalProperties:
5858
properties:
5959
certificate:
60-
format: byte
6160
type: string
6261
hostname:
6362
type: string
63+
key:
64+
type: string
6465
type: object
65-
type: array
66+
type: object
6667
privateKey:
6768
type: string
6869
type: object

config/rbac/role.yaml

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,42 @@ metadata:
66
creationTimestamp: null
77
name: manager-role
88
rules:
9+
- apiGroups:
10+
- ""
11+
resources:
12+
- configmaps
13+
verbs:
14+
- create
15+
- delete
16+
- get
17+
- list
18+
- patch
19+
- update
20+
- watch
21+
- apiGroups:
22+
- ""
23+
resources:
24+
- services
25+
verbs:
26+
- create
27+
- delete
28+
- get
29+
- list
30+
- patch
31+
- update
32+
- watch
33+
- apiGroups:
34+
- apps
35+
resources:
36+
- deployments
37+
verbs:
38+
- create
39+
- delete
40+
- get
41+
- list
42+
- patch
43+
- update
44+
- watch
945
- apiGroups:
1046
- letsencrypt.operatingopenshift.org
1147
resources:
@@ -44,3 +80,41 @@ rules:
4480
- patch
4581
- update
4682
- watch
83+
- apiGroups:
84+
- route.openshift.io
85+
resources:
86+
- routes/custom-host
87+
verbs:
88+
- create
89+
- delete
90+
- get
91+
- list
92+
- patch
93+
- update
94+
- watch
95+
- apiGroups:
96+
- route.openshift.io.operatingopenshift.org
97+
resources:
98+
- routes
99+
verbs:
100+
- create
101+
- delete
102+
- get
103+
- list
104+
- patch
105+
- update
106+
- watch
107+
- apiGroups:
108+
- route.openshift.io.operatingopenshift.org
109+
resources:
110+
- routes/finalizers
111+
verbs:
112+
- update
113+
- apiGroups:
114+
- route.openshift.io.operatingopenshift.org
115+
resources:
116+
- routes/status
117+
verbs:
118+
- get
119+
- patch
120+
- update

config/samples/kustomization.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
## Append samples you want in your CSV to this file as resources ##
22
resources:
33
- letsencrypt_v1beta1_encrypteddomain.yaml
4+
- route.openshift.io_v1_route.yaml
45
#+kubebuilder:scaffold:manifestskustomizesamples

0 commit comments

Comments
 (0)