Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ RUN if [ -f $CACHITO_ENV_FILE ] ; then source $CACHITO_ENV_FILE ; fi ; env ${GO_
RUN if [ -f $CACHITO_ENV_FILE ] ; then source $CACHITO_ENV_FILE ; fi ; env ${GO_BUILD_EXTRA_ENV_ARGS} go build ${GO_BUILD_EXTRA_ARGS} -a -o ${DEST_ROOT}/operator cmd/operator/main.go

RUN cp -r config/services ${DEST_ROOT}/services
RUN cp -r bindata ${DEST_ROOT}/bindata
RUN cp -r bindata ${DEST_ROOT}/bindata && rm -rf ${DEST_ROOT}/bindata/rbac

# Use distroless as minimal base image to package the manager binary
# Refer to https://github.com/GoogleContainerTools/distroless for more details
Expand Down
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -406,11 +406,14 @@ bundle: manifests kustomize operator-sdk ## Generate bundle manifests and metada
$(KUSTOMIZE) edit set image controller=$(IMG) && \
$(KUSTOMIZE) edit add patch --kind Deployment --name openstack-operator-controller-init --namespace system --patch "[{\"op\": \"replace\", \"path\": \"/spec/template/spec/containers/0/env/0\", \"value\": {\"name\": \"OPENSTACK_RELEASE_VERSION\", \"value\": \"$(OPENSTACK_RELEASE_VERSION)\"}}]" && \
$(KUSTOMIZE) edit add patch --kind Deployment --name openstack-operator-controller-init --namespace system --patch "[{\"op\": \"replace\", \"path\": \"/spec/template/spec/containers/0/env/1\", \"value\": {\"name\": \"OPERATOR_IMAGE_URL\", \"value\": \"$(IMG)\"}}]"
rm -rf bundle/manifests bundle/metadata
$(KUSTOMIZE) build config/operator --load-restrictor='LoadRestrictionsNone' | $(OPERATOR_SDK) generate bundle $(BUNDLE_GEN_FLAGS)
ifneq ($(REPLACES),)
@echo "Adding replaces: $(REPLACES) to CSV"
sed -i "/^ name: openstack-operator.v$(VERSION)/a\ replaces: $(REPLACES)" bundle/manifests/openstack-operator.clusterserviceversion.yaml
endif
@echo "Staging service operator RBAC into bundle manifests"
cp config/operator/bundle-rbac/*.yaml bundle/manifests/
$(OPERATOR_SDK) bundle validate ./bundle

.PHONY: bundle-build
Expand Down
14 changes: 6 additions & 8 deletions bindata/rbac/rbac.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -739,20 +739,18 @@ rules:
- patch
- update
- watch
- apiGroups:
- rbac.authorization.k8s.io
resources:
- clusterrolebindings
- clusterroles
verbs:
- '*'
- apiGroups:
- rbac.authorization.k8s.io
resources:
- rolebindings
- roles
verbs:
- '*'
- create
- get
- list
- patch
- update
- watch
- apiGroups:
- redis.openstack.org
resources:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# NOTE: this file is automatically generated by hack/sync-bindata.sh!
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: barbican-operator-leader-election-role
rules:
- apiGroups:
- ""
resources:
- configmaps
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- coordination.k8s.io
resources:
- leases
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- ""
resources:
- events
verbs:
- create
- patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# NOTE: this file is automatically generated by hack/sync-bindata.sh!
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: barbican-operator-leader-election-rolebinding
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: barbican-operator-leader-election-role
subjects:
- kind: ServiceAccount
name: barbican-operator-controller-manager
193 changes: 193 additions & 0 deletions config/operator/bundle-rbac/barbican-operator-manager-role.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,193 @@
# NOTE: this file is automatically generated by hack/sync-bindata.sh!
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: barbican-operator-manager-role
rules:
- apiGroups:
- ""
resources:
- configmaps
- pods
- secrets
- services
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- ""
resources:
- serviceaccounts
verbs:
- create
- get
- list
- patch
- update
- watch
- apiGroups:
- apps
resources:
- deployments
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- barbican.openstack.org
resources:
- barbicanapis
- barbicankeystonelisteners
- barbicans
- barbicanworkers
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- barbican.openstack.org
resources:
- barbicanapis/finalizers
- barbicankeystonelisteners/finalizers
- barbicans/finalizers
- barbicanworkers/finalizers
verbs:
- patch
- update
- apiGroups:
- barbican.openstack.org
resources:
- barbicanapis/status
- barbicankeystonelisteners/status
- barbicans/status
- barbicanworkers/status
verbs:
- get
- patch
- update
- apiGroups:
- batch
resources:
- jobs
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- k8s.cni.cncf.io
resources:
- network-attachment-definitions
verbs:
- get
- list
- watch
- apiGroups:
- keystone.openstack.org
resources:
- keystoneapis
verbs:
- get
- list
- watch
- apiGroups:
- keystone.openstack.org
resources:
- keystoneendpoints
- keystoneservices
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- mariadb.openstack.org
resources:
- mariadbaccounts
- mariadbdatabases
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- mariadb.openstack.org
resources:
- mariadbaccounts/finalizers
verbs:
- update
- apiGroups:
- rabbitmq.openstack.org
resources:
- transporturls
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- rbac.authorization.k8s.io
resources:
- rolebindings
- roles
verbs:
- create
- get
- list
- patch
- update
- watch
- apiGroups:
- security.openshift.io
resourceNames:
- anyuid
resources:
- securitycontextconstraints
verbs:
- use
- apiGroups:
- topology.openstack.org
resources:
- topologies
verbs:
- get
- list
- update
- watch
- apiGroups:
- authentication.k8s.io
resources:
- tokenreviews
verbs:
- create
- apiGroups:
- authorization.k8s.io
resources:
- subjectaccessreviews
verbs:
- create
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# NOTE: this file is automatically generated by hack/sync-bindata.sh!
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: barbican-operator-manager-rolebinding
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: barbican-operator-manager-role
subjects:
- kind: ServiceAccount
name: barbican-operator-controller-manager
namespace: openstack-operators
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# NOTE: this file is automatically generated by hack/sync-bindata.sh!
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: barbican-operator-operator-metrics-auth-role
rules:
- apiGroups:
- authentication.k8s.io
resources:
- tokenreviews
verbs:
- create
- apiGroups:
- authorization.k8s.io
resources:
- subjectaccessreviews
verbs:
- create
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# NOTE: this file is automatically generated by hack/sync-bindata.sh!
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: barbican-operator-operator-metrics-auth-rolebinding
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: barbican-operator-operator-metrics-auth-role
subjects:
- kind: ServiceAccount
name: barbican-operator-operator-controller-manager
namespace: openstack-operators
10 changes: 10 additions & 0 deletions config/operator/bundle-rbac/barbican-operator-metrics-reader.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# NOTE: this file is automatically generated by hack/sync-bindata.sh!
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: barbican-operator-operator-metrics-reader
rules:
- nonResourceURLs:
- /metrics
verbs:
- get
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# NOTE: this file is automatically generated by hack/sync-bindata.sh!
apiVersion: v1
kind: ServiceAccount
metadata:
name: barbican-operator-controller-manager
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# NOTE: this file is automatically generated by hack/sync-bindata.sh!
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: cinder-operator-leader-election-role
rules:
- apiGroups:
- ""
resources:
- configmaps
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- coordination.k8s.io
resources:
- leases
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- ""
resources:
- events
verbs:
- create
- patch
Loading
Loading