File tree 10 files changed +92
-2
lines changed
10 files changed +92
-2
lines changed Original file line number Diff line number Diff line change 1
1
# Build the manager binary
2
- FROM golang :1.16 as builder
2
+ FROM registry.access.redhat.com/ubi8/go-toolset :1.15.7 as builder
3
3
4
4
WORKDIR /workspace
5
5
# Copy the Go Modules manifests
@@ -14,8 +14,10 @@ COPY main.go main.go
14
14
COPY api/ api/
15
15
COPY controllers/ controllers/
16
16
17
+ USER 0
18
+
17
19
# Build
18
- RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a - o manager main.go
20
+ RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o manager main.go
19
21
20
22
# Use distroless as minimal base image to package the manager binary
21
23
# Refer to https://github.com/GoogleContainerTools/distroless for more details
Original file line number Diff line number Diff line change @@ -79,6 +79,9 @@ release: manifests kustomize controller-gen
79
79
80
80
# #@ Development
81
81
82
+ build-template : manifests kustomize controller-gen
83
+ $(KUSTOMIZE ) build config/deployment-template | ./manifest2template.py > deploy.yml
84
+
82
85
manifests : controller-gen # # Generate WebhookConfiguration, ClusterRole and CustomResourceDefinition objects.
83
86
$(CONTROLLER_GEN ) $(CRD_OPTIONS ) rbac:roleName=manager-role webhook paths=" ./..." output:crd:artifacts:config=config/crd/bases
84
87
Original file line number Diff line number Diff line change
1
+ # Adds namespace to all resources.
2
+ namespace : frontend-operator-system
3
+
4
+ # Value of this field is prepended to the
5
+ # names of all resources, e.g. a deployment named
6
+ # "wordpress" becomes "alices-wordpress".
7
+ # Note that it should also match with the prefix (text before '-') of the namespace
8
+ # field above.
9
+ namePrefix : frontend-operator-
10
+
11
+ # Labels to add to all resources and selectors.
12
+ # commonLabels:
13
+ # someName: someValue
14
+
15
+ bases :
16
+ - ../crd
17
+ - ../rbac
18
+ - ../manager
19
+ # [WEBHOOK] To enable webhook, uncomment all the sections with [WEBHOOK] prefix including the one in
20
+ # crd/kustomization.yaml
21
+ # - ../webhook
22
+
23
+ patchesStrategicMerge :
24
+ - manager.yaml # Put template param refs into image field
25
+
26
+ vars : []
Original file line number Diff line number Diff line change
1
+ apiVersion : apps/v1
2
+ kind : Deployment
3
+ metadata :
4
+ name : controller-manager
5
+ namespace : system
6
+ spec :
7
+ template :
8
+ spec :
9
+ containers :
10
+ - image : ${IMAGE}:${IMAGE_TAG}
11
+ name : manager
Original file line number Diff line number Diff line change @@ -3,6 +3,8 @@ apiVersion: rbac.authorization.k8s.io/v1
3
3
kind : ClusterRole
4
4
metadata :
5
5
name : bundle-viewer-role
6
+ labels :
7
+ rbac.authorization.k8s.io/aggregate-to-view : " true"
6
8
rules :
7
9
- apiGroups :
8
10
- cloud.redhat.com
Original file line number Diff line number Diff line change @@ -3,6 +3,9 @@ apiVersion: rbac.authorization.k8s.io/v1
3
3
kind : ClusterRole
4
4
metadata :
5
5
name : frontend-viewer-role
6
+ labels :
7
+ rbac.authorization.k8s.io/aggregate-to-view : " true"
8
+
6
9
rules :
7
10
- apiGroups :
8
11
- cloud.redhat.com
Original file line number Diff line number Diff line change @@ -3,6 +3,8 @@ apiVersion: rbac.authorization.k8s.io/v1
3
3
kind : ClusterRole
4
4
metadata :
5
5
name : frontendenvironment-viewer-role
6
+ labels :
7
+ rbac.authorization.k8s.io/aggregate-to-view : " true"
6
8
rules :
7
9
- apiGroups :
8
10
- cloud.redhat.com
Original file line number Diff line number Diff line change @@ -16,3 +16,9 @@ resources:
16
16
- auth_proxy_role.yaml
17
17
- auth_proxy_role_binding.yaml
18
18
- auth_proxy_client_clusterrole.yaml
19
+ - frontend_editor_role.yaml
20
+ - frontend_viewer_role.yaml
21
+ - frontendenvironment_editor_role.yaml
22
+ - frontendenvironment_viewer_role.yaml
23
+ - bundle_editor_role.yaml
24
+ - bundle_viewer_role.yaml
Original file line number Diff line number Diff line change
1
+ #!/usr/bin/env python3
2
+
3
+ import yaml
4
+ import sys
5
+
6
+ yamls = yaml .safe_load_all (sys .stdin )
7
+
8
+ with open ("template.yml" ) as fp :
9
+ template = yaml .safe_load (fp )
10
+
11
+ template ["objects" ].extend (yamls )
12
+
13
+ print (yaml .dump (template ))
Original file line number Diff line number Diff line change
1
+ apiVersion : v1
2
+ kind : Template
3
+ metadata :
4
+ name : clowder
5
+ parameters :
6
+ - name : IMAGE_TAG
7
+ value : latest
8
+ - name : IMAGE
9
+ value : quay.io/cloudservices/frontend-operator
10
+ - name : DEBUG_TRIGGERS
11
+ value : " false"
12
+ - name : DEBUG_CACHE_CREATE
13
+ value : " false"
14
+ - name : DEBUG_CACHE_UPDATE
15
+ value : " false"
16
+ - name : DEBUG_CACHE_APPLY
17
+ value : " false"
18
+ - name : CREATE_SERVICE_MONITORS
19
+ value : " false"
20
+ - name : WATCH_STRIMZI_RESOURCES
21
+ value : " false"
22
+ objects : []
You can’t perform that action at this time.
0 commit comments