Skip to content

Commit

Permalink
make generate bundle manifests
Browse files Browse the repository at this point in the history
Signed-off-by: Ronny Baturov <[email protected]>
  • Loading branch information
rbaturov committed Oct 11, 2024
1 parent 29d067c commit 3450ec5
Show file tree
Hide file tree
Showing 7 changed files with 133 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
apiVersion: v1
kind: Service
metadata:
annotations:
service.beta.openshift.io/serving-cert-secret-name: secret-kube-rbac-proxy-tls
creationTimestamp: null
labels:
control-plane: controller-manager
name: numaresources-controller-manager-metrics-service
spec:
ports:
- name: https
port: 8443
protocol: TCP
targetPort: https
selector:
control-plane: controller-manager
status:
loadBalancer: {}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: numaresources-controller-manager
spec:
endpoints:
- bearerTokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token
interval: 30s
path: /metrics
scheme: https
targetPort: 8443
tlsConfig:
caFile: /etc/prometheus/configmaps/serving-certs-ca-bundle/service-ca.crt
insecureSkipVerify: false
serverName: numaresources-controller-manager-metrics-service.numaresources.svc
selector:
matchLabels:
control-plane: controller-manager
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
creationTimestamp: null
name: numaresources-metrics-reader
rules:
- nonResourceURLs:
- /metrics
verbs:
- get
48 changes: 48 additions & 0 deletions bundle/manifests/numaresources-operator.clusterserviceversion.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -465,6 +465,18 @@ spec:
- get
- list
- update
- apiGroups:
- authentication.k8s.io
resources:
- tokenreviews
verbs:
- create
- apiGroups:
- authorization.k8s.io
resources:
- subjectaccessreviews
verbs:
- create
serviceAccountName: numaresources-controller-manager
deployments:
- label:
Expand Down Expand Up @@ -528,6 +540,35 @@ spec:
memory: 20Mi
securityContext:
allowPrivilegeEscalation: false
- args:
- --secure-listen-address=0.0.0.0:8443
- --upstream=http://127.0.0.1:8080/
- --config-file=/etc/kube-rbac-proxy/config.yaml
- --tls-cert-file=/etc/tls/private/tls.crt
- --tls-private-key-file=/etc/tls/private/tls.key
- --allow-paths=/metrics
- --logtostderr=true
- -v=10
image: gcr.io/kubebuilder/kube-rbac-proxy:v0.15.0
name: kube-rbac-proxy
ports:
- containerPort: 8443
name: https
protocol: TCP
resources: {}
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
terminationMessagePolicy: FallbackToLogsOnError
volumeMounts:
- mountPath: /etc/kube-rbac-proxy
name: secret-kube-rbac-proxy-metric
readOnly: true
- mountPath: /etc/tls/private
name: secret-kube-rbac-proxy-tls
readOnly: true
securityContext:
runAsNonRoot: true
serviceAccountName: numaresources-controller-manager
Expand All @@ -537,6 +578,13 @@ spec:
key: node-role.kubernetes.io/control-plane
- effect: NoSchedule
key: node-role.kubernetes.io/master
volumes:
- name: secret-kube-rbac-proxy-tls
secret:
secretName: secret-kube-rbac-proxy-tls
- name: secret-kube-rbac-proxy-metric
secret:
secretName: numaresources-secret-kube-rbac-proxy-metric
permissions:
- rules:
- apiGroups:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
creationTimestamp: null
name: numaresources-prometheus-k8s
rules:
- apiGroups:
- ""
resources:
- services
- endpoints
- pods
verbs:
- get
- list
- watch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
creationTimestamp: null
name: numaresources-prometheus-k8s
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: numaresources-prometheus-k8s
subjects:
- kind: ServiceAccount
name: prometheus-k8s
namespace: openshift-monitoring
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
apiVersion: v1
kind: Secret
metadata:
name: numaresources-secret-kube-rbac-proxy-metric
stringData:
config.yaml: "\"authorization\":\n \"static\":\n - \"path\": \"/metrics\"\n \"resourceRequest\":
false\n \"user\":\n \"name\": \"system:serviceaccount:openshift-monitoring:prometheus-k8s\"\n
\ \"verb\": \"get\" "
type: Opaque

0 comments on commit 3450ec5

Please sign in to comment.