Skip to content

Commit 669e6e9

Browse files
committed
some reconcilation
1 parent 1e7f7a2 commit 669e6e9

18 files changed

+327
-35
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
*.dll
55
*.so
66
*.dylib
7+
bin/
78

89
# Test binary, built with `go test -c`
910
*.test

Makefile

+5-5
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ BUNDLE_METADATA_OPTS ?= $(BUNDLE_CHANNELS) $(BUNDLE_DEFAULT_CHANNEL)
2929
#
3030
# For example, running 'make bundle-build bundle-push catalog-build catalog-push' will build and push both
3131
# operatingopenshift.org/le-operator-bundle:$VERSION and operatingopenshift.org/le-operator-catalog:$VERSION.
32-
IMAGE_TAG_BASE ?= operatingopenshift.org/le-operator
32+
IMAGE_TAG_BASE ?= quay.io/mdewald/le-operator
3333

3434
# BUNDLE_IMG defines the image:tag used for the bundle.
3535
# You can use it as an arg. (E.g make bundle-build BUNDLE_IMG=<some-registry>/<project-name-bundle>:<tag>)
@@ -97,10 +97,10 @@ run: manifests generate fmt vet ## Run a controller from your host.
9797
go run ./main.go
9898

9999
docker-build: test ## Build docker image with the manager.
100-
docker build -t ${IMG} .
100+
podman build -t ${IMG} .
101101

102102
docker-push: ## Push docker image with the manager.
103-
docker push ${IMG}
103+
podman push ${IMG}
104104

105105
##@ Deployment
106106

@@ -153,7 +153,7 @@ bundle: manifests kustomize ## Generate bundle manifests and metadata, then vali
153153

154154
.PHONY: bundle-build
155155
bundle-build: ## Build the bundle image.
156-
docker build -f bundle.Dockerfile -t $(BUNDLE_IMG) .
156+
podman build -f bundle.Dockerfile -t $(BUNDLE_IMG) .
157157

158158
.PHONY: bundle-push
159159
bundle-push: ## Push the bundle image.
@@ -193,7 +193,7 @@ endif
193193
# https://github.com/operator-framework/community-operators/blob/7f1438c/docs/packaging-operator.md#updating-your-existing-operator
194194
.PHONY: catalog-build
195195
catalog-build: opm ## Build a catalog image.
196-
$(OPM) index add --container-tool docker --mode semver --tag $(CATALOG_IMG) --bundles $(BUNDLE_IMGS) $(FROM_INDEX_OPT)
196+
$(OPM) index add --container-tool podman --mode semver --tag $(CATALOG_IMG) --bundles $(BUNDLE_IMGS) $(FROM_INDEX_OPT)
197197

198198
# Push the catalog image.
199199
.PHONY: catalog-push

api/v1beta1/encrypteddomain_types.go

+4-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,10 @@ type EncryptedDomainSpec struct {
3232
MatchingHostnames string `json:"matchingHostnames,omitempty"`
3333

3434
// CA directory Endpoint to use for certificate requests
35-
CADir string `json:"acmeEndpoint,omitempty"`
35+
CADir string `json:"caDir,omitempty"`
36+
37+
// Ignore invalid SSL certificate on CADir
38+
CADirInsecureSSL bool `json:"caDirInsecureSSL,omitempty"`
3639

3740
// Mail address to use for registration with CA directory
3841
RegistrationMail string `json:"registrationMail,omitempty"`

api/v1beta1/zz_generated.deepcopy.go

+28-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

bin/controller-gen

-19.3 MB
Binary file not shown.

bin/kustomize

-44.3 MB
Binary file not shown.

config/challenge/kustomization.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
resources:
2+
- service.yaml

config/challenge/service.yaml

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
apiVersion: v1
2+
kind: Service
3+
metadata:
4+
name: acme-challenge
5+
spec:
6+
selector:
7+
control-plane: controller-manager
8+
ports:
9+
- protocol: TCP
10+
port: 5002
11+
targetPort: 5002

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

+25-3
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,35 @@ spec:
3636
spec:
3737
description: EncryptedDomainSpec defines the desired state of EncryptedDomain
3838
properties:
39-
foo:
40-
description: Foo is an example field of EncryptedDomain. Edit encrypteddomain_types.go
41-
to remove/update
39+
caDir:
40+
description: CA directory Endpoint to use for certificate requests
41+
type: string
42+
caDirInsecureSSL:
43+
description: Ignore invalid SSL certificate on CADir
44+
type: boolean
45+
matchingHostnames:
46+
description: MatchingHostnames is a regex describing which hostnames
47+
to generate certificates for.
48+
type: string
49+
registrationMail:
50+
description: Mail address to use for registration with CA directory
4251
type: string
4352
type: object
4453
status:
4554
description: EncryptedDomainStatus defines the observed state of EncryptedDomain
55+
properties:
56+
generatedCertificate:
57+
items:
58+
properties:
59+
certificate:
60+
format: byte
61+
type: string
62+
hostname:
63+
type: string
64+
type: object
65+
type: array
66+
privateKey:
67+
type: string
4668
type: object
4769
type: object
4870
served: true

config/default/kustomization.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ bases:
1616
- ../crd
1717
- ../rbac
1818
- ../manager
19+
- ../challenge
1920
# [WEBHOOK] To enable webhook, uncomment all the sections with [WEBHOOK] prefix including the one in
2021
# crd/kustomization.yaml
2122
#- ../webhook

config/manager/kustomization.yaml

+7-2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ generatorOptions:
55
disableNameSuffixHash: true
66

77
configMapGenerator:
8-
- name: manager-config
9-
files:
8+
- files:
109
- controller_manager_config.yaml
10+
name: manager-config
11+
apiVersion: kustomize.config.k8s.io/v1beta1
12+
kind: Kustomization
13+
images:
14+
- name: controller
15+
newName: quay.io/mdewald/le-operator

config/rbac/role.yaml

+12
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,15 @@ rules:
3232
- get
3333
- patch
3434
- update
35+
- apiGroups:
36+
- route.openshift.io
37+
resources:
38+
- routes
39+
verbs:
40+
- create
41+
- delete
42+
- get
43+
- list
44+
- patch
45+
- update
46+
- watch

config/samples/letsencrypt_v1beta1_encrypteddomain.yaml

+5-1
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,9 @@ apiVersion: letsencrypt.operatingopenshift.org/v1beta1
22
kind: EncryptedDomain
33
metadata:
44
name: encrypteddomain-sample
5+
namespace: default
56
spec:
6-
# Add fields here
7+
matchingHostnames: "^highscore-default.apps-crc.testing$"
8+
caDir: "https://pebble:14000/dir"
9+
caDirInsecureSSL: true
10+
RegistrationMail: "[email protected]"

0 commit comments

Comments
 (0)