Skip to content
This repository was archived by the owner on Dec 3, 2024. It is now read-only.

Commit 7bb872e

Browse files
committed
Operator SDK adjustments
Had trouble running operator-sdk commands due to PROJECT serialization. Reconciled project structure against freshly generated template.
1 parent 453a2a9 commit 7bb872e

File tree

11 files changed

+43
-12
lines changed

11 files changed

+43
-12
lines changed

.dockerignore

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
# More info: https://docs.docker.com/engine/reference/builder/#dockerignore-file
2-
# Ignore all files which are not go type
3-
!**/*.go
4-
!**/*.mod
5-
!**/*.sum
2+
# Ignore build and test binaries.
3+
bin/
4+
testbin/

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ COPY controllers/ controllers/
1616
COPY orm/ orm/
1717

1818
# Build
19-
RUN CGO_ENABLED=0 GOOS=linux GO111MODULE=on go build -a -o manager main.go
19+
RUN CGO_ENABLED=0 GOOS=linux go build -a -o manager main.go
2020

2121
# Use distroless as minimal base image to package the manager binary
2222
# Refer to https://github.com/GoogleContainerTools/distroless for more details

PROJECT

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,35 @@ layout:
44
projectName: mysql-dba-operator
55
repo: github.com/cuppett/mysql-dba-operator
66
resources:
7-
- crdVersion: v1
7+
- api:
8+
crdVersion: v1
9+
namespaced: true
10+
controller: true
11+
domain: apps.cuppett.dev
12+
group: mysql
13+
kind: AdminConnection
14+
path: github.com/cuppett/mysql-dba-operator/api/v1alpha1
15+
version: v1alpha1
16+
- api:
17+
crdVersion: v1
18+
namespaced: true
19+
controller: true
20+
domain: apps.cuppett.dev
821
group: mysql
922
kind: Database
23+
path: github.com/cuppett/mysql-dba-operator/api/v1alpha1
1024
version: v1alpha1
11-
webhookVersion: v1
12-
- crdVersion: v1
25+
webhooks:
26+
validation: true
27+
webhookVersion: v1
28+
- api:
29+
crdVersion: v1
30+
namespaced: true
31+
controller: true
32+
domain: apps.cuppett.dev
1333
group: mysql
1434
kind: DatabaseUser
35+
path: github.com/cuppett/mysql-dba-operator/api/v1alpha1
1536
version: v1alpha1
1637
version: "3"
1738
plugins:

config/crd/patches/webhook_in_adminconnections.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,5 @@ spec:
1212
namespace: system
1313
name: webhook-service
1414
path: /convert
15+
conversionReviewVersions:
16+
- v1

config/crd/patches/webhook_in_databases.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,3 @@ spec:
1414
path: /convert
1515
conversionReviewVersions:
1616
- v1
17-
- v1beta1

config/crd/patches/webhook_in_databaseusers.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,5 @@ spec:
1212
namespace: system
1313
name: webhook-service
1414
path: /convert
15+
conversionReviewVersions:
16+
- v1

config/default/manager_auth_proxy_patch.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ spec:
1515
- "--secure-listen-address=0.0.0.0:8443"
1616
- "--upstream=http://127.0.0.1:8080/"
1717
- "--logtostderr=true"
18-
- "--v=10"
18+
- "--v=0"
1919
ports:
2020
- containerPort: 8443
2121
protocol: TCP

config/default/webhookcainjection_patch.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# This patch add annotation to admission webhook config and
22
# the variables $(CERTIFICATE_NAMESPACE) and $(CERTIFICATE_NAME) will be substituted by kustomize.
3+
#apiVersion: admissionregistration.k8s.io/v1
4+
#kind: MutatingWebhookConfiguration
5+
#metadata:
6+
# name: mutating-webhook-configuration
7+
# annotations:
8+
# cert-manager.io/inject-ca-from: $(CERTIFICATE_NAMESPACE)/$(CERTIFICATE_NAME)
39
---
410
apiVersion: admissionregistration.k8s.io/v1
511
kind: ValidatingWebhookConfiguration

config/manager/manager.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ spec:
1919
replicas: 1
2020
template:
2121
metadata:
22+
annotations:
23+
kubectl.kubernetes.io/default-container: manager
2224
labels:
2325
control-plane: controller-manager
2426
spec:

config/manifests/kustomization.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# These resources constitute the fully configured set of manifests
22
# used to generate the 'manifests/' directory in a bundle.
33
resources:
4-
- bases/new.clusterserviceversion.yaml
4+
- bases/mysql-dba-operator.clusterserviceversion.yaml
55
- ../default
66
- ../samples
77
- ../scorecard

0 commit comments

Comments
 (0)