Skip to content

Commit

Permalink
Feature/enrich grafana controller manager labels (#1373)
Browse files Browse the repository at this point in the history
  • Loading branch information
mikaayil authored Jan 22, 2024
1 parent 8980d42 commit cf17590
Show file tree
Hide file tree
Showing 9 changed files with 159 additions and 37 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ kind: Service
metadata:
creationTimestamp: null
labels:
control-plane: controller-manager
app.kubernetes.io/managed-by: olm
app.kubernetes.io/name: grafana-operator
name: grafana-operator-operator-metrics-service
spec:
ports:
Expand All @@ -12,6 +13,7 @@ spec:
protocol: TCP
targetPort: metrics
selector:
control-plane: controller-manager
app.kubernetes.io/managed-by: olm
app.kubernetes.io/name: grafana-operator
status:
loadBalancer: {}
11 changes: 7 additions & 4 deletions bundle/manifests/grafana-operator.clusterserviceversion.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ metadata:
capabilities: Basic Install
categories: Monitoring
containerImage: ghcr.io/grafana/grafana-operator@sha256:97561cef949b58f55ec67d133c02ac205e2ec3fb77388aeb868dacfcebad0752
createdAt: "2023-12-20T15:40:51Z"
createdAt: "2024-01-22T07:16:13Z"
operators.operatorframework.io/builder: operator-sdk-v1.32.0
operators.operatorframework.io/project_layout: go.kubebuilder.io/v3
repository: https://github.com/grafana/grafana-operator
Expand Down Expand Up @@ -304,18 +304,21 @@ spec:
serviceAccountName: grafana-operator-controller-manager
deployments:
- label:
control-plane: controller-manager
app.kubernetes.io/managed-by: olm
app.kubernetes.io/name: grafana-operator
name: grafana-operator-controller-manager
spec:
replicas: 1
selector:
matchLabels:
control-plane: controller-manager
app.kubernetes.io/managed-by: olm
app.kubernetes.io/name: grafana-operator
strategy: {}
template:
metadata:
labels:
control-plane: controller-manager
app.kubernetes.io/managed-by: olm
app.kubernetes.io/name: grafana-operator
spec:
containers:
- args:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,6 @@ spec:
type: string
user:
type: string
required:
- access
- name
- type
- url
type: object
instanceSelector:
properties:
Expand Down
139 changes: 127 additions & 12 deletions bundle/manifests/grafana.integreatly.org_grafanas.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,16 @@ spec:
type: object
type: object
x-kubernetes-map-type: atomic
matchLabelKeys:
items:
type: string
type: array
x-kubernetes-list-type: atomic
mismatchLabelKeys:
items:
type: string
type: array
x-kubernetes-list-type: atomic
namespaceSelector:
properties:
matchExpressions:
Expand Down Expand Up @@ -336,6 +346,16 @@ spec:
type: object
type: object
x-kubernetes-map-type: atomic
matchLabelKeys:
items:
type: string
type: array
x-kubernetes-list-type: atomic
mismatchLabelKeys:
items:
type: string
type: array
x-kubernetes-list-type: atomic
namespaceSelector:
properties:
matchExpressions:
Expand Down Expand Up @@ -402,6 +422,16 @@ spec:
type: object
type: object
x-kubernetes-map-type: atomic
matchLabelKeys:
items:
type: string
type: array
x-kubernetes-list-type: atomic
mismatchLabelKeys:
items:
type: string
type: array
x-kubernetes-list-type: atomic
namespaceSelector:
properties:
matchExpressions:
Expand Down Expand Up @@ -470,6 +500,16 @@ spec:
type: object
type: object
x-kubernetes-map-type: atomic
matchLabelKeys:
items:
type: string
type: array
x-kubernetes-list-type: atomic
mismatchLabelKeys:
items:
type: string
type: array
x-kubernetes-list-type: atomic
namespaceSelector:
properties:
matchExpressions:
Expand Down Expand Up @@ -649,6 +689,14 @@ spec:
required:
- port
type: object
sleep:
properties:
seconds:
format: int64
type: integer
required:
- seconds
type: object
tcpSocket:
properties:
host:
Expand Down Expand Up @@ -699,6 +747,14 @@ spec:
required:
- port
type: object
sleep:
properties:
seconds:
format: int64
type: integer
required:
- seconds
type: object
tcpSocket:
properties:
host:
Expand Down Expand Up @@ -1293,6 +1349,14 @@ spec:
required:
- port
type: object
sleep:
properties:
seconds:
format: int64
type: integer
required:
- seconds
type: object
tcpSocket:
properties:
host:
Expand Down Expand Up @@ -1343,6 +1407,14 @@ spec:
required:
- port
type: object
sleep:
properties:
seconds:
format: int64
type: integer
required:
- seconds
type: object
tcpSocket:
properties:
host:
Expand Down Expand Up @@ -1944,6 +2016,14 @@ spec:
required:
- port
type: object
sleep:
properties:
seconds:
format: int64
type: integer
required:
- seconds
type: object
tcpSocket:
properties:
host:
Expand Down Expand Up @@ -1994,6 +2074,14 @@ spec:
required:
- port
type: object
sleep:
properties:
seconds:
format: int64
type: integer
required:
- seconds
type: object
tcpSocket:
properties:
host:
Expand Down Expand Up @@ -2846,18 +2934,6 @@ spec:
type: object
resources:
properties:
claims:
items:
properties:
name:
type: string
required:
- name
type: object
type: array
x-kubernetes-list-map-keys:
- name
x-kubernetes-list-type: map
limits:
additionalProperties:
anyOf:
Expand Down Expand Up @@ -2901,6 +2977,8 @@ spec:
x-kubernetes-map-type: atomic
storageClassName:
type: string
volumeAttributesClassName:
type: string
volumeMode:
type: string
volumeName:
Expand Down Expand Up @@ -3089,6 +3167,43 @@ spec:
sources:
items:
properties:
clusterTrustBundle:
properties:
labelSelector:
properties:
matchExpressions:
items:
properties:
key:
type: string
operator:
type: string
values:
items:
type: string
type: array
required:
- key
- operator
type: object
type: array
matchLabels:
additionalProperties:
type: string
type: object
type: object
x-kubernetes-map-type: atomic
name:
type: string
optional:
type: boolean
path:
type: string
signerName:
type: string
required:
- path
type: object
configMap:
properties:
items:
Expand Down
6 changes: 4 additions & 2 deletions config/default/metrics_service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ apiVersion: v1
kind: Service
metadata:
labels:
control-plane: controller-manager
app.kubernetes.io/name: grafana-operator
app.kubernetes.io/managed-by: olm
name: operator-metrics-service
namespace: system
spec:
Expand All @@ -12,4 +13,5 @@ spec:
protocol: TCP
targetPort: metrics
selector:
control-plane: controller-manager
app.kubernetes.io/name: grafana-operator
app.kubernetes.io/managed-by: olm
12 changes: 8 additions & 4 deletions config/manager/manager.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ apiVersion: v1
kind: Namespace
metadata:
labels:
control-plane: controller-manager
app.kubernetes.io/name: grafana-operator
app.kubernetes.io/managed-by: olm
name: system
---
apiVersion: apps/v1
Expand All @@ -11,16 +12,19 @@ metadata:
name: controller-manager
namespace: system
labels:
control-plane: controller-manager
app.kubernetes.io/name: grafana-operator
app.kubernetes.io/managed-by: olm
spec:
selector:
matchLabels:
control-plane: controller-manager
app.kubernetes.io/name: grafana-operator
app.kubernetes.io/managed-by: olm
replicas: 1
template:
metadata:
labels:
control-plane: controller-manager
app.kubernetes.io/name: grafana-operator
app.kubernetes.io/managed-by: olm
spec:
securityContext:
runAsNonRoot: true
Expand Down
7 changes: 4 additions & 3 deletions config/prometheus/monitor.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@

# Prometheus Monitor Service (Metrics)
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
labels:
control-plane: controller-manager
app.kubernetes.io/name: grafana-operator
app.kubernetes.io/managed-by: olm
name: controller-manager-metrics-monitor
namespace: system
spec:
Expand All @@ -17,4 +17,5 @@ spec:
insecureSkipVerify: true
selector:
matchLabels:
control-plane: controller-manager
app.kubernetes.io/name: grafana-operator
app.kubernetes.io/managed-by: olm
6 changes: 3 additions & 3 deletions deploy/kustomize/base/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@ metadata:
name: grafana-operator-controller-manager
namespace: default
labels:
app: grafana-operator-controller-manager
app.kubernetes.io/name: grafana-operator
spec:
replicas: 1
selector:
matchLabels:
control-plane: grafana-operator-controller-manager
app.kubernetes.io/name: grafana-operator
strategy: {}
template:
metadata:
labels:
control-plane: grafana-operator-controller-manager
app.kubernetes.io/name: grafana-operator
spec:
containers:
- args:
Expand Down
Loading

0 comments on commit cf17590

Please sign in to comment.