mirror of
https://github.com/nofusscomputing/kubernetes.git
synced 2025-08-02 04:22:42 +00:00
126
manifests/grafana-operator/base/clusterrole.yaml
Normal file
126
manifests/grafana-operator/base/clusterrole.yaml
Normal file
@ -0,0 +1,126 @@
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/component: controller
|
||||
name: controller-manager
|
||||
rules:
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- configmaps
|
||||
- persistentvolumeclaims
|
||||
- secrets
|
||||
- serviceaccounts
|
||||
- services
|
||||
verbs:
|
||||
- create
|
||||
- delete
|
||||
- get
|
||||
- list
|
||||
- patch
|
||||
- update
|
||||
- watch
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- events
|
||||
verbs:
|
||||
- create
|
||||
- get
|
||||
- list
|
||||
- patch
|
||||
- watch
|
||||
- apiGroups:
|
||||
- apps
|
||||
resources:
|
||||
- deployments
|
||||
verbs:
|
||||
- create
|
||||
- delete
|
||||
- get
|
||||
- list
|
||||
- patch
|
||||
- update
|
||||
- watch
|
||||
- apiGroups:
|
||||
- coordination.k8s.io
|
||||
resources:
|
||||
- leases
|
||||
verbs:
|
||||
- create
|
||||
- delete
|
||||
- get
|
||||
- list
|
||||
- patch
|
||||
- update
|
||||
- watch
|
||||
- apiGroups:
|
||||
- grafana.integreatly.org
|
||||
resources:
|
||||
- grafanaalertrulegroups
|
||||
- grafanacontactpoints
|
||||
- grafanadashboards
|
||||
- grafanadatasources
|
||||
- grafanafolders
|
||||
- grafananotificationpolicies
|
||||
- grafanas
|
||||
verbs:
|
||||
- create
|
||||
- delete
|
||||
- get
|
||||
- list
|
||||
- patch
|
||||
- update
|
||||
- watch
|
||||
- apiGroups:
|
||||
- grafana.integreatly.org
|
||||
resources:
|
||||
- grafanaalertrulegroups/finalizers
|
||||
- grafanacontactpoints/finalizers
|
||||
- grafanadashboards/finalizers
|
||||
- grafanadatasources/finalizers
|
||||
- grafanafolders/finalizers
|
||||
- grafananotificationpolicies/finalizers
|
||||
- grafanas/finalizers
|
||||
verbs:
|
||||
- update
|
||||
- apiGroups:
|
||||
- grafana.integreatly.org
|
||||
resources:
|
||||
- grafanaalertrulegroups/status
|
||||
- grafanacontactpoints/status
|
||||
- grafanadashboards/status
|
||||
- grafanadatasources/status
|
||||
- grafanafolders/status
|
||||
- grafananotificationpolicies/status
|
||||
- grafanas/status
|
||||
verbs:
|
||||
- get
|
||||
- patch
|
||||
- update
|
||||
- apiGroups:
|
||||
- networking.k8s.io
|
||||
resources:
|
||||
- ingresses
|
||||
verbs:
|
||||
- create
|
||||
- delete
|
||||
- get
|
||||
- list
|
||||
- patch
|
||||
- update
|
||||
- watch
|
||||
- apiGroups:
|
||||
- route.openshift.io
|
||||
resources:
|
||||
- routes
|
||||
- routes/custom-host
|
||||
verbs:
|
||||
- create
|
||||
- delete
|
||||
- get
|
||||
- list
|
||||
- update
|
||||
- watch
|
15
manifests/grafana-operator/base/clusterrolebinding.yaml
Normal file
15
manifests/grafana-operator/base/clusterrolebinding.yaml
Normal file
@ -0,0 +1,15 @@
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRoleBinding
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/component: controller
|
||||
name: controller-manager
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: ClusterRole
|
||||
name: controller-manager
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: controller-manager
|
||||
namespace: changeme
|
@ -0,0 +1,309 @@
|
||||
---
|
||||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
controller-gen.kubebuilder.io/version: v0.16.3
|
||||
name: grafanaalertrulegroups.grafana.integreatly.org
|
||||
spec:
|
||||
group: grafana.integreatly.org
|
||||
names:
|
||||
categories:
|
||||
- grafana-operator
|
||||
kind: GrafanaAlertRuleGroup
|
||||
listKind: GrafanaAlertRuleGroupList
|
||||
plural: grafanaalertrulegroups
|
||||
singular: grafanaalertrulegroup
|
||||
scope: Namespaced
|
||||
versions:
|
||||
- name: v1beta1
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
description: GrafanaAlertRuleGroup is the Schema for the grafanaalertrulegroups
|
||||
API
|
||||
properties:
|
||||
apiVersion:
|
||||
description: |-
|
||||
APIVersion defines the versioned schema of this representation of an object.
|
||||
Servers should convert recognized schemas to the latest internal value, and
|
||||
may reject unrecognized values.
|
||||
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
|
||||
type: string
|
||||
kind:
|
||||
description: |-
|
||||
Kind is a string value representing the REST resource this object represents.
|
||||
Servers may infer this from the endpoint the client submits requests to.
|
||||
Cannot be updated.
|
||||
In CamelCase.
|
||||
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
|
||||
type: string
|
||||
metadata:
|
||||
type: object
|
||||
spec:
|
||||
description: GrafanaAlertRuleGroupSpec defines the desired state of GrafanaAlertRuleGroup
|
||||
properties:
|
||||
allowCrossNamespaceImport:
|
||||
type: boolean
|
||||
editable:
|
||||
description: Whether to enable or disable editing of the alert rule
|
||||
group in Grafana UI
|
||||
type: boolean
|
||||
x-kubernetes-validations:
|
||||
- message: Value is immutable
|
||||
rule: self == oldSelf
|
||||
folderRef:
|
||||
description: Match GrafanaFolders CRs to infer the uid
|
||||
type: string
|
||||
folderUID:
|
||||
description: |-
|
||||
UID of the folder containing this rule group
|
||||
Overrides the FolderSelector
|
||||
type: string
|
||||
instanceSelector:
|
||||
description: selects Grafanas for import
|
||||
properties:
|
||||
matchExpressions:
|
||||
description: matchExpressions is a list of label selector requirements.
|
||||
The requirements are ANDed.
|
||||
items:
|
||||
description: |-
|
||||
A label selector requirement is a selector that contains values, a key, and an operator that
|
||||
relates the key and values.
|
||||
properties:
|
||||
key:
|
||||
description: key is the label key that the selector applies
|
||||
to.
|
||||
type: string
|
||||
operator:
|
||||
description: |-
|
||||
operator represents a key's relationship to a set of values.
|
||||
Valid operators are In, NotIn, Exists and DoesNotExist.
|
||||
type: string
|
||||
values:
|
||||
description: |-
|
||||
values is an array of string values. If the operator is In or NotIn,
|
||||
the values array must be non-empty. If the operator is Exists or DoesNotExist,
|
||||
the values array must be empty. This array is replaced during a strategic
|
||||
merge patch.
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
x-kubernetes-list-type: atomic
|
||||
required:
|
||||
- key
|
||||
- operator
|
||||
type: object
|
||||
type: array
|
||||
x-kubernetes-list-type: atomic
|
||||
matchLabels:
|
||||
additionalProperties:
|
||||
type: string
|
||||
description: |-
|
||||
matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
|
||||
map is equivalent to an element of matchExpressions, whose key field is "key", the
|
||||
operator is "In", and the values array contains only "value". The requirements are ANDed.
|
||||
type: object
|
||||
type: object
|
||||
x-kubernetes-map-type: atomic
|
||||
x-kubernetes-validations:
|
||||
- message: Value is immutable
|
||||
rule: self == oldSelf
|
||||
interval:
|
||||
format: duration
|
||||
pattern: ^([0-9]+(\.[0-9]+)?(ns|us|µs|ms|s|m|h))+$
|
||||
type: string
|
||||
name:
|
||||
description: Name of the alert rule group. If not specified, the resource
|
||||
name will be used.
|
||||
type: string
|
||||
resyncPeriod:
|
||||
default: 10m
|
||||
format: duration
|
||||
pattern: ^([0-9]+(\.[0-9]+)?(ns|us|µs|ms|s|m|h))+$
|
||||
type: string
|
||||
rules:
|
||||
items:
|
||||
description: AlertRule defines a specific rule to be evaluated.
|
||||
It is based on the upstream model with some k8s specific type
|
||||
mappings
|
||||
properties:
|
||||
annotations:
|
||||
additionalProperties:
|
||||
type: string
|
||||
type: object
|
||||
condition:
|
||||
type: string
|
||||
data:
|
||||
items:
|
||||
properties:
|
||||
datasourceUid:
|
||||
description: Grafana data source unique identifier; it
|
||||
should be '__expr__' for a Server Side Expression operation.
|
||||
type: string
|
||||
model:
|
||||
description: JSON is the raw JSON query and includes the
|
||||
above properties as well as custom properties.
|
||||
x-kubernetes-preserve-unknown-fields: true
|
||||
queryType:
|
||||
description: |-
|
||||
QueryType is an optional identifier for the type of query.
|
||||
It can be used to distinguish different types of queries.
|
||||
type: string
|
||||
refId:
|
||||
description: RefID is the unique identifier of the query,
|
||||
set by the frontend call.
|
||||
type: string
|
||||
relativeTimeRange:
|
||||
description: relative time range
|
||||
properties:
|
||||
from:
|
||||
description: from
|
||||
format: int64
|
||||
type: integer
|
||||
to:
|
||||
description: to
|
||||
format: int64
|
||||
type: integer
|
||||
type: object
|
||||
type: object
|
||||
type: array
|
||||
execErrState:
|
||||
enum:
|
||||
- OK
|
||||
- Alerting
|
||||
- Error
|
||||
- KeepLast
|
||||
type: string
|
||||
for:
|
||||
format: duration
|
||||
pattern: ^([0-9]+(\.[0-9]+)?(ns|us|µs|ms|s|m|h))+$
|
||||
type: string
|
||||
isPaused:
|
||||
type: boolean
|
||||
labels:
|
||||
additionalProperties:
|
||||
type: string
|
||||
type: object
|
||||
noDataState:
|
||||
enum:
|
||||
- Alerting
|
||||
- NoData
|
||||
- OK
|
||||
- KeepLast
|
||||
type: string
|
||||
notificationSettings:
|
||||
properties:
|
||||
group_by:
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
group_interval:
|
||||
type: string
|
||||
group_wait:
|
||||
type: string
|
||||
mute_time_intervals:
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
receiver:
|
||||
type: string
|
||||
repeat_interval:
|
||||
type: string
|
||||
required:
|
||||
- receiver
|
||||
type: object
|
||||
title:
|
||||
example: Always firing
|
||||
maxLength: 190
|
||||
minLength: 1
|
||||
type: string
|
||||
uid:
|
||||
pattern: ^[a-zA-Z0-9-_]+$
|
||||
type: string
|
||||
required:
|
||||
- condition
|
||||
- data
|
||||
- execErrState
|
||||
- for
|
||||
- noDataState
|
||||
- title
|
||||
- uid
|
||||
type: object
|
||||
type: array
|
||||
required:
|
||||
- instanceSelector
|
||||
- interval
|
||||
- rules
|
||||
type: object
|
||||
x-kubernetes-validations:
|
||||
- message: Only one of FolderUID or FolderRef can be set
|
||||
rule: (has(self.folderUID) && !(has(self.folderRef))) || (has(self.folderRef)
|
||||
&& !(has(self.folderUID)))
|
||||
status:
|
||||
description: GrafanaAlertRuleGroupStatus defines the observed state of
|
||||
GrafanaAlertRuleGroup
|
||||
properties:
|
||||
conditions:
|
||||
items:
|
||||
description: Condition contains details for one aspect of the current
|
||||
state of this API Resource.
|
||||
properties:
|
||||
lastTransitionTime:
|
||||
description: |-
|
||||
lastTransitionTime is the last time the condition transitioned from one status to another.
|
||||
This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable.
|
||||
format: date-time
|
||||
type: string
|
||||
message:
|
||||
description: |-
|
||||
message is a human readable message indicating details about the transition.
|
||||
This may be an empty string.
|
||||
maxLength: 32768
|
||||
type: string
|
||||
observedGeneration:
|
||||
description: |-
|
||||
observedGeneration represents the .metadata.generation that the condition was set based upon.
|
||||
For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date
|
||||
with respect to the current state of the instance.
|
||||
format: int64
|
||||
minimum: 0
|
||||
type: integer
|
||||
reason:
|
||||
description: |-
|
||||
reason contains a programmatic identifier indicating the reason for the condition's last transition.
|
||||
Producers of specific condition types may define expected values and meanings for this field,
|
||||
and whether the values are considered a guaranteed API.
|
||||
The value should be a CamelCase string.
|
||||
This field may not be empty.
|
||||
maxLength: 1024
|
||||
minLength: 1
|
||||
pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$
|
||||
type: string
|
||||
status:
|
||||
description: status of the condition, one of True, False, Unknown.
|
||||
enum:
|
||||
- "True"
|
||||
- "False"
|
||||
- Unknown
|
||||
type: string
|
||||
type:
|
||||
description: type of condition in CamelCase or in foo.example.com/CamelCase.
|
||||
maxLength: 316
|
||||
pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$
|
||||
type: string
|
||||
required:
|
||||
- lastTransitionTime
|
||||
- message
|
||||
- reason
|
||||
- status
|
||||
- type
|
||||
type: object
|
||||
type: array
|
||||
required:
|
||||
- conditions
|
||||
type: object
|
||||
type: object
|
||||
served: true
|
||||
storage: true
|
||||
subresources:
|
||||
status: {}
|
@ -0,0 +1,271 @@
|
||||
---
|
||||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
controller-gen.kubebuilder.io/version: v0.16.3
|
||||
name: grafanacontactpoints.grafana.integreatly.org
|
||||
spec:
|
||||
group: grafana.integreatly.org
|
||||
names:
|
||||
categories:
|
||||
- grafana-operator
|
||||
kind: GrafanaContactPoint
|
||||
listKind: GrafanaContactPointList
|
||||
plural: grafanacontactpoints
|
||||
singular: grafanacontactpoint
|
||||
scope: Namespaced
|
||||
versions:
|
||||
- name: v1beta1
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
description: GrafanaContactPoint is the Schema for the grafanacontactpoints
|
||||
API
|
||||
properties:
|
||||
apiVersion:
|
||||
description: |-
|
||||
APIVersion defines the versioned schema of this representation of an object.
|
||||
Servers should convert recognized schemas to the latest internal value, and
|
||||
may reject unrecognized values.
|
||||
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
|
||||
type: string
|
||||
kind:
|
||||
description: |-
|
||||
Kind is a string value representing the REST resource this object represents.
|
||||
Servers may infer this from the endpoint the client submits requests to.
|
||||
Cannot be updated.
|
||||
In CamelCase.
|
||||
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
|
||||
type: string
|
||||
metadata:
|
||||
type: object
|
||||
spec:
|
||||
description: GrafanaContactPointSpec defines the desired state of GrafanaContactPoint
|
||||
properties:
|
||||
allowCrossNamespaceImport:
|
||||
type: boolean
|
||||
disableResolveMessage:
|
||||
type: boolean
|
||||
instanceSelector:
|
||||
description: selects Grafanas for import
|
||||
properties:
|
||||
matchExpressions:
|
||||
description: matchExpressions is a list of label selector requirements.
|
||||
The requirements are ANDed.
|
||||
items:
|
||||
description: |-
|
||||
A label selector requirement is a selector that contains values, a key, and an operator that
|
||||
relates the key and values.
|
||||
properties:
|
||||
key:
|
||||
description: key is the label key that the selector applies
|
||||
to.
|
||||
type: string
|
||||
operator:
|
||||
description: |-
|
||||
operator represents a key's relationship to a set of values.
|
||||
Valid operators are In, NotIn, Exists and DoesNotExist.
|
||||
type: string
|
||||
values:
|
||||
description: |-
|
||||
values is an array of string values. If the operator is In or NotIn,
|
||||
the values array must be non-empty. If the operator is Exists or DoesNotExist,
|
||||
the values array must be empty. This array is replaced during a strategic
|
||||
merge patch.
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
x-kubernetes-list-type: atomic
|
||||
required:
|
||||
- key
|
||||
- operator
|
||||
type: object
|
||||
type: array
|
||||
x-kubernetes-list-type: atomic
|
||||
matchLabels:
|
||||
additionalProperties:
|
||||
type: string
|
||||
description: |-
|
||||
matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
|
||||
map is equivalent to an element of matchExpressions, whose key field is "key", the
|
||||
operator is "In", and the values array contains only "value". The requirements are ANDed.
|
||||
type: object
|
||||
type: object
|
||||
x-kubernetes-map-type: atomic
|
||||
x-kubernetes-validations:
|
||||
- message: Value is immutable
|
||||
rule: self == oldSelf
|
||||
name:
|
||||
type: string
|
||||
resyncPeriod:
|
||||
default: 10m
|
||||
format: duration
|
||||
pattern: ^([0-9]+(\.[0-9]+)?(ns|us|µs|ms|s|m|h))+$
|
||||
type: string
|
||||
settings:
|
||||
x-kubernetes-preserve-unknown-fields: true
|
||||
type:
|
||||
enum:
|
||||
- alertmanager
|
||||
- prometheus-alertmanager
|
||||
- dingding
|
||||
- discord
|
||||
- email
|
||||
- googlechat
|
||||
- kafka
|
||||
- line
|
||||
- opsgenie
|
||||
- pagerduty
|
||||
- pushover
|
||||
- sensugo
|
||||
- sensu
|
||||
- slack
|
||||
- teams
|
||||
- telegram
|
||||
- threema
|
||||
- victorops
|
||||
- webhook
|
||||
- wecom
|
||||
- hipchat
|
||||
- oncall
|
||||
type: string
|
||||
valuesFrom:
|
||||
items:
|
||||
properties:
|
||||
targetPath:
|
||||
type: string
|
||||
valueFrom:
|
||||
properties:
|
||||
configMapKeyRef:
|
||||
description: Selects a key of a ConfigMap.
|
||||
properties:
|
||||
key:
|
||||
description: The key to select.
|
||||
type: string
|
||||
name:
|
||||
default: ""
|
||||
description: |-
|
||||
Name of the referent.
|
||||
This field is effectively required, but due to backwards compatibility is
|
||||
allowed to be empty. Instances of this type with an empty value here are
|
||||
almost certainly wrong.
|
||||
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
|
||||
type: string
|
||||
optional:
|
||||
description: Specify whether the ConfigMap or its key
|
||||
must be defined
|
||||
type: boolean
|
||||
required:
|
||||
- key
|
||||
type: object
|
||||
x-kubernetes-map-type: atomic
|
||||
secretKeyRef:
|
||||
description: Selects a key of a Secret.
|
||||
properties:
|
||||
key:
|
||||
description: The key of the secret to select from. Must
|
||||
be a valid secret key.
|
||||
type: string
|
||||
name:
|
||||
default: ""
|
||||
description: |-
|
||||
Name of the referent.
|
||||
This field is effectively required, but due to backwards compatibility is
|
||||
allowed to be empty. Instances of this type with an empty value here are
|
||||
almost certainly wrong.
|
||||
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
|
||||
type: string
|
||||
optional:
|
||||
description: Specify whether the Secret or its key must
|
||||
be defined
|
||||
type: boolean
|
||||
required:
|
||||
- key
|
||||
type: object
|
||||
x-kubernetes-map-type: atomic
|
||||
type: object
|
||||
x-kubernetes-validations:
|
||||
- message: Either configMapKeyRef or secretKeyRef must be set
|
||||
rule: (has(self.configMapKeyRef) && !has(self.secretKeyRef))
|
||||
|| (!has(self.configMapKeyRef) && has(self.secretKeyRef))
|
||||
required:
|
||||
- targetPath
|
||||
- valueFrom
|
||||
type: object
|
||||
maxItems: 99
|
||||
type: array
|
||||
required:
|
||||
- instanceSelector
|
||||
- name
|
||||
- settings
|
||||
type: object
|
||||
status:
|
||||
description: GrafanaContactPointStatus defines the observed state of GrafanaContactPoint
|
||||
properties:
|
||||
conditions:
|
||||
description: |-
|
||||
INSERT ADDITIONAL STATUS FIELD - define observed state of cluster
|
||||
Important: Run "make" to regenerate code after modifying this file
|
||||
items:
|
||||
description: Condition contains details for one aspect of the current
|
||||
state of this API Resource.
|
||||
properties:
|
||||
lastTransitionTime:
|
||||
description: |-
|
||||
lastTransitionTime is the last time the condition transitioned from one status to another.
|
||||
This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable.
|
||||
format: date-time
|
||||
type: string
|
||||
message:
|
||||
description: |-
|
||||
message is a human readable message indicating details about the transition.
|
||||
This may be an empty string.
|
||||
maxLength: 32768
|
||||
type: string
|
||||
observedGeneration:
|
||||
description: |-
|
||||
observedGeneration represents the .metadata.generation that the condition was set based upon.
|
||||
For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date
|
||||
with respect to the current state of the instance.
|
||||
format: int64
|
||||
minimum: 0
|
||||
type: integer
|
||||
reason:
|
||||
description: |-
|
||||
reason contains a programmatic identifier indicating the reason for the condition's last transition.
|
||||
Producers of specific condition types may define expected values and meanings for this field,
|
||||
and whether the values are considered a guaranteed API.
|
||||
The value should be a CamelCase string.
|
||||
This field may not be empty.
|
||||
maxLength: 1024
|
||||
minLength: 1
|
||||
pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$
|
||||
type: string
|
||||
status:
|
||||
description: status of the condition, one of True, False, Unknown.
|
||||
enum:
|
||||
- "True"
|
||||
- "False"
|
||||
- Unknown
|
||||
type: string
|
||||
type:
|
||||
description: type of condition in CamelCase or in foo.example.com/CamelCase.
|
||||
maxLength: 316
|
||||
pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$
|
||||
type: string
|
||||
required:
|
||||
- lastTransitionTime
|
||||
- message
|
||||
- reason
|
||||
- status
|
||||
- type
|
||||
type: object
|
||||
type: array
|
||||
required:
|
||||
- conditions
|
||||
type: object
|
||||
type: object
|
||||
served: true
|
||||
storage: true
|
||||
subresources:
|
||||
status: {}
|
@ -0,0 +1,495 @@
|
||||
---
|
||||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
controller-gen.kubebuilder.io/version: v0.16.3
|
||||
name: grafanadashboards.grafana.integreatly.org
|
||||
spec:
|
||||
group: grafana.integreatly.org
|
||||
names:
|
||||
categories:
|
||||
- grafana-operator
|
||||
kind: GrafanaDashboard
|
||||
listKind: GrafanaDashboardList
|
||||
plural: grafanadashboards
|
||||
singular: grafanadashboard
|
||||
scope: Namespaced
|
||||
versions:
|
||||
- additionalPrinterColumns:
|
||||
- jsonPath: .status.NoMatchingInstances
|
||||
name: No matching instances
|
||||
type: boolean
|
||||
- format: date-time
|
||||
jsonPath: .status.lastResync
|
||||
name: Last resync
|
||||
type: date
|
||||
- jsonPath: .metadata.creationTimestamp
|
||||
name: Age
|
||||
type: date
|
||||
name: v1beta1
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
description: GrafanaDashboard is the Schema for the grafanadashboards API
|
||||
properties:
|
||||
apiVersion:
|
||||
description: |-
|
||||
APIVersion defines the versioned schema of this representation of an object.
|
||||
Servers should convert recognized schemas to the latest internal value, and
|
||||
may reject unrecognized values.
|
||||
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
|
||||
type: string
|
||||
kind:
|
||||
description: |-
|
||||
Kind is a string value representing the REST resource this object represents.
|
||||
Servers may infer this from the endpoint the client submits requests to.
|
||||
Cannot be updated.
|
||||
In CamelCase.
|
||||
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
|
||||
type: string
|
||||
metadata:
|
||||
type: object
|
||||
spec:
|
||||
description: GrafanaDashboardSpec defines the desired state of GrafanaDashboard
|
||||
properties:
|
||||
allowCrossNamespaceImport:
|
||||
description: allow to import this resources from an operator in a
|
||||
different namespace
|
||||
type: boolean
|
||||
configMapRef:
|
||||
description: dashboard from configmap
|
||||
properties:
|
||||
key:
|
||||
description: The key to select.
|
||||
type: string
|
||||
name:
|
||||
default: ""
|
||||
description: |-
|
||||
Name of the referent.
|
||||
This field is effectively required, but due to backwards compatibility is
|
||||
allowed to be empty. Instances of this type with an empty value here are
|
||||
almost certainly wrong.
|
||||
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
|
||||
type: string
|
||||
optional:
|
||||
description: Specify whether the ConfigMap or its key must be
|
||||
defined
|
||||
type: boolean
|
||||
required:
|
||||
- key
|
||||
type: object
|
||||
x-kubernetes-map-type: atomic
|
||||
contentCacheDuration:
|
||||
description: Cache duration for dashboards fetched from URLs
|
||||
type: string
|
||||
datasources:
|
||||
description: maps required data sources to existing ones
|
||||
items:
|
||||
properties:
|
||||
datasourceName:
|
||||
type: string
|
||||
inputName:
|
||||
type: string
|
||||
required:
|
||||
- datasourceName
|
||||
- inputName
|
||||
type: object
|
||||
type: array
|
||||
envFrom:
|
||||
description: environments variables from secrets or config maps
|
||||
items:
|
||||
properties:
|
||||
configMapKeyRef:
|
||||
description: Selects a key of a ConfigMap.
|
||||
properties:
|
||||
key:
|
||||
description: The key to select.
|
||||
type: string
|
||||
name:
|
||||
default: ""
|
||||
description: |-
|
||||
Name of the referent.
|
||||
This field is effectively required, but due to backwards compatibility is
|
||||
allowed to be empty. Instances of this type with an empty value here are
|
||||
almost certainly wrong.
|
||||
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
|
||||
type: string
|
||||
optional:
|
||||
description: Specify whether the ConfigMap or its key must
|
||||
be defined
|
||||
type: boolean
|
||||
required:
|
||||
- key
|
||||
type: object
|
||||
x-kubernetes-map-type: atomic
|
||||
secretKeyRef:
|
||||
description: Selects a key of a Secret.
|
||||
properties:
|
||||
key:
|
||||
description: The key of the secret to select from. Must
|
||||
be a valid secret key.
|
||||
type: string
|
||||
name:
|
||||
default: ""
|
||||
description: |-
|
||||
Name of the referent.
|
||||
This field is effectively required, but due to backwards compatibility is
|
||||
allowed to be empty. Instances of this type with an empty value here are
|
||||
almost certainly wrong.
|
||||
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
|
||||
type: string
|
||||
optional:
|
||||
description: Specify whether the Secret or its key must
|
||||
be defined
|
||||
type: boolean
|
||||
required:
|
||||
- key
|
||||
type: object
|
||||
x-kubernetes-map-type: atomic
|
||||
type: object
|
||||
type: array
|
||||
envs:
|
||||
description: environments variables as a map
|
||||
items:
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
value:
|
||||
description: Inline env value
|
||||
type: string
|
||||
valueFrom:
|
||||
description: Reference on value source, might be the reference
|
||||
on a secret or config map
|
||||
properties:
|
||||
configMapKeyRef:
|
||||
description: Selects a key of a ConfigMap.
|
||||
properties:
|
||||
key:
|
||||
description: The key to select.
|
||||
type: string
|
||||
name:
|
||||
default: ""
|
||||
description: |-
|
||||
Name of the referent.
|
||||
This field is effectively required, but due to backwards compatibility is
|
||||
allowed to be empty. Instances of this type with an empty value here are
|
||||
almost certainly wrong.
|
||||
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
|
||||
type: string
|
||||
optional:
|
||||
description: Specify whether the ConfigMap or its key
|
||||
must be defined
|
||||
type: boolean
|
||||
required:
|
||||
- key
|
||||
type: object
|
||||
x-kubernetes-map-type: atomic
|
||||
secretKeyRef:
|
||||
description: Selects a key of a Secret.
|
||||
properties:
|
||||
key:
|
||||
description: The key of the secret to select from. Must
|
||||
be a valid secret key.
|
||||
type: string
|
||||
name:
|
||||
default: ""
|
||||
description: |-
|
||||
Name of the referent.
|
||||
This field is effectively required, but due to backwards compatibility is
|
||||
allowed to be empty. Instances of this type with an empty value here are
|
||||
almost certainly wrong.
|
||||
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
|
||||
type: string
|
||||
optional:
|
||||
description: Specify whether the Secret or its key must
|
||||
be defined
|
||||
type: boolean
|
||||
required:
|
||||
- key
|
||||
type: object
|
||||
x-kubernetes-map-type: atomic
|
||||
type: object
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
type: array
|
||||
folder:
|
||||
description: folder assignment for dashboard
|
||||
type: string
|
||||
folderRef:
|
||||
description: Name of a `GrafanaFolder` resource in the same namespace
|
||||
type: string
|
||||
folderUID:
|
||||
description: UID of the target folder for this dashboard
|
||||
type: string
|
||||
grafanaCom:
|
||||
description: grafana.com/dashboards
|
||||
properties:
|
||||
id:
|
||||
type: integer
|
||||
revision:
|
||||
type: integer
|
||||
required:
|
||||
- id
|
||||
type: object
|
||||
gzipJson:
|
||||
description: GzipJson the dashboard's JSON compressed with Gzip. Base64-encoded
|
||||
when in YAML.
|
||||
format: byte
|
||||
type: string
|
||||
instanceSelector:
|
||||
description: selects Grafanas for import
|
||||
properties:
|
||||
matchExpressions:
|
||||
description: matchExpressions is a list of label selector requirements.
|
||||
The requirements are ANDed.
|
||||
items:
|
||||
description: |-
|
||||
A label selector requirement is a selector that contains values, a key, and an operator that
|
||||
relates the key and values.
|
||||
properties:
|
||||
key:
|
||||
description: key is the label key that the selector applies
|
||||
to.
|
||||
type: string
|
||||
operator:
|
||||
description: |-
|
||||
operator represents a key's relationship to a set of values.
|
||||
Valid operators are In, NotIn, Exists and DoesNotExist.
|
||||
type: string
|
||||
values:
|
||||
description: |-
|
||||
values is an array of string values. If the operator is In or NotIn,
|
||||
the values array must be non-empty. If the operator is Exists or DoesNotExist,
|
||||
the values array must be empty. This array is replaced during a strategic
|
||||
merge patch.
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
x-kubernetes-list-type: atomic
|
||||
required:
|
||||
- key
|
||||
- operator
|
||||
type: object
|
||||
type: array
|
||||
x-kubernetes-list-type: atomic
|
||||
matchLabels:
|
||||
additionalProperties:
|
||||
type: string
|
||||
description: |-
|
||||
matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
|
||||
map is equivalent to an element of matchExpressions, whose key field is "key", the
|
||||
operator is "In", and the values array contains only "value". The requirements are ANDed.
|
||||
type: object
|
||||
type: object
|
||||
x-kubernetes-map-type: atomic
|
||||
x-kubernetes-validations:
|
||||
- message: Value is immutable
|
||||
rule: self == oldSelf
|
||||
json:
|
||||
description: dashboard json
|
||||
type: string
|
||||
jsonnet:
|
||||
description: Jsonnet
|
||||
type: string
|
||||
jsonnetLib:
|
||||
description: Jsonnet project build
|
||||
properties:
|
||||
fileName:
|
||||
type: string
|
||||
gzipJsonnetProject:
|
||||
format: byte
|
||||
type: string
|
||||
jPath:
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
required:
|
||||
- fileName
|
||||
- gzipJsonnetProject
|
||||
type: object
|
||||
plugins:
|
||||
description: plugins
|
||||
items:
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
version:
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
- version
|
||||
type: object
|
||||
type: array
|
||||
resyncPeriod:
|
||||
default: 5m
|
||||
description: how often the dashboard is refreshed, defaults to 5m
|
||||
if not set
|
||||
format: duration
|
||||
pattern: ^([0-9]+(\.[0-9]+)?(ns|us|µs|ms|s|m|h))+$
|
||||
type: string
|
||||
uid:
|
||||
description: Manually specify the uid for the dashboard, overwrites
|
||||
uids already present in the json model
|
||||
type: string
|
||||
x-kubernetes-validations:
|
||||
- message: spec.uid is immutable
|
||||
rule: self == oldSelf
|
||||
url:
|
||||
description: dashboard url
|
||||
type: string
|
||||
urlAuthorization:
|
||||
description: authorization options for dashboard from url
|
||||
properties:
|
||||
basicAuth:
|
||||
properties:
|
||||
password:
|
||||
description: SecretKeySelector selects a key of a Secret.
|
||||
properties:
|
||||
key:
|
||||
description: The key of the secret to select from. Must
|
||||
be a valid secret key.
|
||||
type: string
|
||||
name:
|
||||
default: ""
|
||||
description: |-
|
||||
Name of the referent.
|
||||
This field is effectively required, but due to backwards compatibility is
|
||||
allowed to be empty. Instances of this type with an empty value here are
|
||||
almost certainly wrong.
|
||||
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
|
||||
type: string
|
||||
optional:
|
||||
description: Specify whether the Secret or its key must
|
||||
be defined
|
||||
type: boolean
|
||||
required:
|
||||
- key
|
||||
type: object
|
||||
x-kubernetes-map-type: atomic
|
||||
username:
|
||||
description: SecretKeySelector selects a key of a Secret.
|
||||
properties:
|
||||
key:
|
||||
description: The key of the secret to select from. Must
|
||||
be a valid secret key.
|
||||
type: string
|
||||
name:
|
||||
default: ""
|
||||
description: |-
|
||||
Name of the referent.
|
||||
This field is effectively required, but due to backwards compatibility is
|
||||
allowed to be empty. Instances of this type with an empty value here are
|
||||
almost certainly wrong.
|
||||
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
|
||||
type: string
|
||||
optional:
|
||||
description: Specify whether the Secret or its key must
|
||||
be defined
|
||||
type: boolean
|
||||
required:
|
||||
- key
|
||||
type: object
|
||||
x-kubernetes-map-type: atomic
|
||||
type: object
|
||||
type: object
|
||||
required:
|
||||
- instanceSelector
|
||||
type: object
|
||||
x-kubernetes-validations:
|
||||
- message: Only one of folderUID or folderRef can be declared at the same
|
||||
time
|
||||
rule: (has(self.folderUID) && !(has(self.folderRef))) || (has(self.folderRef)
|
||||
&& !(has(self.folderUID))) || !(has(self.folderRef) && (has(self.folderUID)))
|
||||
- message: folder field cannot be set when folderUID or folderRef is already
|
||||
declared
|
||||
rule: (has(self.folder) && !(has(self.folderRef) || has(self.folderUID)))
|
||||
|| !(has(self.folder))
|
||||
- message: spec.uid is immutable
|
||||
rule: ((!has(oldSelf.uid) && !has(self.uid)) || (has(oldSelf.uid) &&
|
||||
has(self.uid)))
|
||||
status:
|
||||
description: GrafanaDashboardStatus defines the observed state of GrafanaDashboard
|
||||
properties:
|
||||
NoMatchingInstances:
|
||||
description: The dashboard instanceSelector can't find matching grafana
|
||||
instances
|
||||
type: boolean
|
||||
conditions:
|
||||
items:
|
||||
description: Condition contains details for one aspect of the current
|
||||
state of this API Resource.
|
||||
properties:
|
||||
lastTransitionTime:
|
||||
description: |-
|
||||
lastTransitionTime is the last time the condition transitioned from one status to another.
|
||||
This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable.
|
||||
format: date-time
|
||||
type: string
|
||||
message:
|
||||
description: |-
|
||||
message is a human readable message indicating details about the transition.
|
||||
This may be an empty string.
|
||||
maxLength: 32768
|
||||
type: string
|
||||
observedGeneration:
|
||||
description: |-
|
||||
observedGeneration represents the .metadata.generation that the condition was set based upon.
|
||||
For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date
|
||||
with respect to the current state of the instance.
|
||||
format: int64
|
||||
minimum: 0
|
||||
type: integer
|
||||
reason:
|
||||
description: |-
|
||||
reason contains a programmatic identifier indicating the reason for the condition's last transition.
|
||||
Producers of specific condition types may define expected values and meanings for this field,
|
||||
and whether the values are considered a guaranteed API.
|
||||
The value should be a CamelCase string.
|
||||
This field may not be empty.
|
||||
maxLength: 1024
|
||||
minLength: 1
|
||||
pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$
|
||||
type: string
|
||||
status:
|
||||
description: status of the condition, one of True, False, Unknown.
|
||||
enum:
|
||||
- "True"
|
||||
- "False"
|
||||
- Unknown
|
||||
type: string
|
||||
type:
|
||||
description: type of condition in CamelCase or in foo.example.com/CamelCase.
|
||||
maxLength: 316
|
||||
pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$
|
||||
type: string
|
||||
required:
|
||||
- lastTransitionTime
|
||||
- message
|
||||
- reason
|
||||
- status
|
||||
- type
|
||||
type: object
|
||||
type: array
|
||||
contentCache:
|
||||
format: byte
|
||||
type: string
|
||||
contentTimestamp:
|
||||
format: date-time
|
||||
type: string
|
||||
contentUrl:
|
||||
type: string
|
||||
hash:
|
||||
type: string
|
||||
lastResync:
|
||||
description: Last time the dashboard was resynced
|
||||
format: date-time
|
||||
type: string
|
||||
uid:
|
||||
type: string
|
||||
type: object
|
||||
type: object
|
||||
served: true
|
||||
storage: true
|
||||
subresources:
|
||||
status: {}
|
@ -0,0 +1,256 @@
|
||||
---
|
||||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
controller-gen.kubebuilder.io/version: v0.16.3
|
||||
name: grafanadatasources.grafana.integreatly.org
|
||||
spec:
|
||||
group: grafana.integreatly.org
|
||||
names:
|
||||
categories:
|
||||
- grafana-operator
|
||||
kind: GrafanaDatasource
|
||||
listKind: GrafanaDatasourceList
|
||||
plural: grafanadatasources
|
||||
singular: grafanadatasource
|
||||
scope: Namespaced
|
||||
versions:
|
||||
- additionalPrinterColumns:
|
||||
- jsonPath: .status.NoMatchingInstances
|
||||
name: No matching instances
|
||||
type: boolean
|
||||
- format: date-time
|
||||
jsonPath: .status.lastResync
|
||||
name: Last resync
|
||||
type: date
|
||||
- jsonPath: .metadata.creationTimestamp
|
||||
name: Age
|
||||
type: date
|
||||
name: v1beta1
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
description: GrafanaDatasource is the Schema for the grafanadatasources API
|
||||
properties:
|
||||
apiVersion:
|
||||
description: |-
|
||||
APIVersion defines the versioned schema of this representation of an object.
|
||||
Servers should convert recognized schemas to the latest internal value, and
|
||||
may reject unrecognized values.
|
||||
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
|
||||
type: string
|
||||
kind:
|
||||
description: |-
|
||||
Kind is a string value representing the REST resource this object represents.
|
||||
Servers may infer this from the endpoint the client submits requests to.
|
||||
Cannot be updated.
|
||||
In CamelCase.
|
||||
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
|
||||
type: string
|
||||
metadata:
|
||||
type: object
|
||||
spec:
|
||||
description: GrafanaDatasourceSpec defines the desired state of GrafanaDatasource
|
||||
properties:
|
||||
allowCrossNamespaceImport:
|
||||
description: allow to import this resources from an operator in a
|
||||
different namespace
|
||||
type: boolean
|
||||
datasource:
|
||||
properties:
|
||||
access:
|
||||
type: string
|
||||
basicAuth:
|
||||
type: boolean
|
||||
basicAuthUser:
|
||||
type: string
|
||||
database:
|
||||
type: string
|
||||
editable:
|
||||
description: Deprecated field, it has no effect
|
||||
type: boolean
|
||||
isDefault:
|
||||
type: boolean
|
||||
jsonData:
|
||||
type: object
|
||||
x-kubernetes-preserve-unknown-fields: true
|
||||
name:
|
||||
type: string
|
||||
orgId:
|
||||
description: Deprecated field, it has no effect
|
||||
format: int64
|
||||
type: integer
|
||||
secureJsonData:
|
||||
type: object
|
||||
x-kubernetes-preserve-unknown-fields: true
|
||||
type:
|
||||
type: string
|
||||
uid:
|
||||
type: string
|
||||
url:
|
||||
type: string
|
||||
user:
|
||||
type: string
|
||||
type: object
|
||||
instanceSelector:
|
||||
description: selects Grafana instances for import
|
||||
properties:
|
||||
matchExpressions:
|
||||
description: matchExpressions is a list of label selector requirements.
|
||||
The requirements are ANDed.
|
||||
items:
|
||||
description: |-
|
||||
A label selector requirement is a selector that contains values, a key, and an operator that
|
||||
relates the key and values.
|
||||
properties:
|
||||
key:
|
||||
description: key is the label key that the selector applies
|
||||
to.
|
||||
type: string
|
||||
operator:
|
||||
description: |-
|
||||
operator represents a key's relationship to a set of values.
|
||||
Valid operators are In, NotIn, Exists and DoesNotExist.
|
||||
type: string
|
||||
values:
|
||||
description: |-
|
||||
values is an array of string values. If the operator is In or NotIn,
|
||||
the values array must be non-empty. If the operator is Exists or DoesNotExist,
|
||||
the values array must be empty. This array is replaced during a strategic
|
||||
merge patch.
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
x-kubernetes-list-type: atomic
|
||||
required:
|
||||
- key
|
||||
- operator
|
||||
type: object
|
||||
type: array
|
||||
x-kubernetes-list-type: atomic
|
||||
matchLabels:
|
||||
additionalProperties:
|
||||
type: string
|
||||
description: |-
|
||||
matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
|
||||
map is equivalent to an element of matchExpressions, whose key field is "key", the
|
||||
operator is "In", and the values array contains only "value". The requirements are ANDed.
|
||||
type: object
|
||||
type: object
|
||||
x-kubernetes-map-type: atomic
|
||||
x-kubernetes-validations:
|
||||
- message: Value is immutable
|
||||
rule: self == oldSelf
|
||||
plugins:
|
||||
description: plugins
|
||||
items:
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
version:
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
- version
|
||||
type: object
|
||||
type: array
|
||||
resyncPeriod:
|
||||
default: 5m
|
||||
description: how often the datasource is refreshed, defaults to 5m
|
||||
if not set
|
||||
format: duration
|
||||
pattern: ^([0-9]+(\.[0-9]+)?(ns|us|µs|ms|s|m|h))+$
|
||||
type: string
|
||||
valuesFrom:
|
||||
description: environments variables from secrets or config maps
|
||||
items:
|
||||
properties:
|
||||
targetPath:
|
||||
type: string
|
||||
valueFrom:
|
||||
properties:
|
||||
configMapKeyRef:
|
||||
description: Selects a key of a ConfigMap.
|
||||
properties:
|
||||
key:
|
||||
description: The key to select.
|
||||
type: string
|
||||
name:
|
||||
default: ""
|
||||
description: |-
|
||||
Name of the referent.
|
||||
This field is effectively required, but due to backwards compatibility is
|
||||
allowed to be empty. Instances of this type with an empty value here are
|
||||
almost certainly wrong.
|
||||
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
|
||||
type: string
|
||||
optional:
|
||||
description: Specify whether the ConfigMap or its key
|
||||
must be defined
|
||||
type: boolean
|
||||
required:
|
||||
- key
|
||||
type: object
|
||||
x-kubernetes-map-type: atomic
|
||||
secretKeyRef:
|
||||
description: Selects a key of a Secret.
|
||||
properties:
|
||||
key:
|
||||
description: The key of the secret to select from. Must
|
||||
be a valid secret key.
|
||||
type: string
|
||||
name:
|
||||
default: ""
|
||||
description: |-
|
||||
Name of the referent.
|
||||
This field is effectively required, but due to backwards compatibility is
|
||||
allowed to be empty. Instances of this type with an empty value here are
|
||||
almost certainly wrong.
|
||||
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
|
||||
type: string
|
||||
optional:
|
||||
description: Specify whether the Secret or its key must
|
||||
be defined
|
||||
type: boolean
|
||||
required:
|
||||
- key
|
||||
type: object
|
||||
x-kubernetes-map-type: atomic
|
||||
type: object
|
||||
x-kubernetes-validations:
|
||||
- message: Either configMapKeyRef or secretKeyRef must be set
|
||||
rule: (has(self.configMapKeyRef) && !has(self.secretKeyRef))
|
||||
|| (!has(self.configMapKeyRef) && has(self.secretKeyRef))
|
||||
required:
|
||||
- targetPath
|
||||
- valueFrom
|
||||
type: object
|
||||
maxItems: 99
|
||||
type: array
|
||||
required:
|
||||
- datasource
|
||||
- instanceSelector
|
||||
type: object
|
||||
status:
|
||||
description: GrafanaDatasourceStatus defines the observed state of GrafanaDatasource
|
||||
properties:
|
||||
NoMatchingInstances:
|
||||
description: The datasource instanceSelector can't find matching grafana
|
||||
instances
|
||||
type: boolean
|
||||
hash:
|
||||
type: string
|
||||
lastMessage:
|
||||
type: string
|
||||
lastResync:
|
||||
description: Last time the datasource was resynced
|
||||
format: date-time
|
||||
type: string
|
||||
uid:
|
||||
type: string
|
||||
type: object
|
||||
type: object
|
||||
served: true
|
||||
storage: true
|
||||
subresources:
|
||||
status: {}
|
@ -0,0 +1,220 @@
|
||||
---
|
||||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
controller-gen.kubebuilder.io/version: v0.16.3
|
||||
name: grafanafolders.grafana.integreatly.org
|
||||
spec:
|
||||
group: grafana.integreatly.org
|
||||
names:
|
||||
categories:
|
||||
- grafana-operator
|
||||
kind: GrafanaFolder
|
||||
listKind: GrafanaFolderList
|
||||
plural: grafanafolders
|
||||
singular: grafanafolder
|
||||
scope: Namespaced
|
||||
versions:
|
||||
- additionalPrinterColumns:
|
||||
- jsonPath: .status.NoMatchingInstances
|
||||
name: No matching instances
|
||||
type: boolean
|
||||
- jsonPath: .metadata.creationTimestamp
|
||||
name: Age
|
||||
type: date
|
||||
name: v1beta1
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
description: GrafanaFolder is the Schema for the grafanafolders API
|
||||
properties:
|
||||
apiVersion:
|
||||
description: |-
|
||||
APIVersion defines the versioned schema of this representation of an object.
|
||||
Servers should convert recognized schemas to the latest internal value, and
|
||||
may reject unrecognized values.
|
||||
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
|
||||
type: string
|
||||
kind:
|
||||
description: |-
|
||||
Kind is a string value representing the REST resource this object represents.
|
||||
Servers may infer this from the endpoint the client submits requests to.
|
||||
Cannot be updated.
|
||||
In CamelCase.
|
||||
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
|
||||
type: string
|
||||
metadata:
|
||||
type: object
|
||||
spec:
|
||||
description: GrafanaFolderSpec defines the desired state of GrafanaFolder
|
||||
properties:
|
||||
allowCrossNamespaceImport:
|
||||
description: Enable matching Grafana instances outside the current
|
||||
namespace
|
||||
type: boolean
|
||||
instanceSelector:
|
||||
description: Selects Grafanas for import
|
||||
properties:
|
||||
matchExpressions:
|
||||
description: matchExpressions is a list of label selector requirements.
|
||||
The requirements are ANDed.
|
||||
items:
|
||||
description: |-
|
||||
A label selector requirement is a selector that contains values, a key, and an operator that
|
||||
relates the key and values.
|
||||
properties:
|
||||
key:
|
||||
description: key is the label key that the selector applies
|
||||
to.
|
||||
type: string
|
||||
operator:
|
||||
description: |-
|
||||
operator represents a key's relationship to a set of values.
|
||||
Valid operators are In, NotIn, Exists and DoesNotExist.
|
||||
type: string
|
||||
values:
|
||||
description: |-
|
||||
values is an array of string values. If the operator is In or NotIn,
|
||||
the values array must be non-empty. If the operator is Exists or DoesNotExist,
|
||||
the values array must be empty. This array is replaced during a strategic
|
||||
merge patch.
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
x-kubernetes-list-type: atomic
|
||||
required:
|
||||
- key
|
||||
- operator
|
||||
type: object
|
||||
type: array
|
||||
x-kubernetes-list-type: atomic
|
||||
matchLabels:
|
||||
additionalProperties:
|
||||
type: string
|
||||
description: |-
|
||||
matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
|
||||
map is equivalent to an element of matchExpressions, whose key field is "key", the
|
||||
operator is "In", and the values array contains only "value". The requirements are ANDed.
|
||||
type: object
|
||||
type: object
|
||||
x-kubernetes-map-type: atomic
|
||||
x-kubernetes-validations:
|
||||
- message: Value is immutable
|
||||
rule: self == oldSelf
|
||||
parentFolderRef:
|
||||
description: Reference to an existing GrafanaFolder CR in the same
|
||||
namespace
|
||||
type: string
|
||||
parentFolderUID:
|
||||
description: UID of the folder in which the current folder should
|
||||
be created
|
||||
type: string
|
||||
permissions:
|
||||
description: Raw json with folder permissions, potentially exported
|
||||
from Grafana
|
||||
type: string
|
||||
resyncPeriod:
|
||||
default: 5m
|
||||
description: How often the folder is synced, defaults to 5m if not
|
||||
set
|
||||
format: duration
|
||||
pattern: ^([0-9]+(\.[0-9]+)?(ns|us|µs|ms|s|m|h))+$
|
||||
type: string
|
||||
title:
|
||||
description: Display name of the folder in Grafana
|
||||
type: string
|
||||
uid:
|
||||
description: Manually specify the UID the Folder is created with
|
||||
type: string
|
||||
x-kubernetes-validations:
|
||||
- message: spec.uid is immutable
|
||||
rule: self == oldSelf
|
||||
required:
|
||||
- instanceSelector
|
||||
type: object
|
||||
x-kubernetes-validations:
|
||||
- message: Only one of parentFolderUID or parentFolderRef can be set
|
||||
rule: (has(self.parentFolderUID) && !(has(self.parentFolderRef))) ||
|
||||
(has(self.parentFolderRef) && !(has(self.parentFolderUID))) || !(has(self.parentFolderRef)
|
||||
&& (has(self.parentFolderUID)))
|
||||
- message: spec.uid is immutable
|
||||
rule: ((!has(oldSelf.uid) && !has(self.uid)) || (has(oldSelf.uid) &&
|
||||
has(self.uid)))
|
||||
status:
|
||||
description: GrafanaFolderStatus defines the observed state of GrafanaFolder
|
||||
properties:
|
||||
NoMatchingInstances:
|
||||
description: The folder instanceSelector can't find matching grafana
|
||||
instances
|
||||
type: boolean
|
||||
conditions:
|
||||
items:
|
||||
description: Condition contains details for one aspect of the current
|
||||
state of this API Resource.
|
||||
properties:
|
||||
lastTransitionTime:
|
||||
description: |-
|
||||
lastTransitionTime is the last time the condition transitioned from one status to another.
|
||||
This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable.
|
||||
format: date-time
|
||||
type: string
|
||||
message:
|
||||
description: |-
|
||||
message is a human readable message indicating details about the transition.
|
||||
This may be an empty string.
|
||||
maxLength: 32768
|
||||
type: string
|
||||
observedGeneration:
|
||||
description: |-
|
||||
observedGeneration represents the .metadata.generation that the condition was set based upon.
|
||||
For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date
|
||||
with respect to the current state of the instance.
|
||||
format: int64
|
||||
minimum: 0
|
||||
type: integer
|
||||
reason:
|
||||
description: |-
|
||||
reason contains a programmatic identifier indicating the reason for the condition's last transition.
|
||||
Producers of specific condition types may define expected values and meanings for this field,
|
||||
and whether the values are considered a guaranteed API.
|
||||
The value should be a CamelCase string.
|
||||
This field may not be empty.
|
||||
maxLength: 1024
|
||||
minLength: 1
|
||||
pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$
|
||||
type: string
|
||||
status:
|
||||
description: status of the condition, one of True, False, Unknown.
|
||||
enum:
|
||||
- "True"
|
||||
- "False"
|
||||
- Unknown
|
||||
type: string
|
||||
type:
|
||||
description: type of condition in CamelCase or in foo.example.com/CamelCase.
|
||||
maxLength: 316
|
||||
pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$
|
||||
type: string
|
||||
required:
|
||||
- lastTransitionTime
|
||||
- message
|
||||
- reason
|
||||
- status
|
||||
- type
|
||||
type: object
|
||||
type: array
|
||||
hash:
|
||||
description: |-
|
||||
INSERT ADDITIONAL STATUS FIELD - define observed state of cluster
|
||||
Important: Run "make" to regenerate code after modifying this file
|
||||
type: string
|
||||
lastResync:
|
||||
description: Last time the folder was resynced
|
||||
format: date-time
|
||||
type: string
|
||||
type: object
|
||||
type: object
|
||||
served: true
|
||||
storage: true
|
||||
subresources:
|
||||
status: {}
|
@ -0,0 +1,250 @@
|
||||
---
|
||||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
controller-gen.kubebuilder.io/version: v0.16.3
|
||||
name: grafananotificationpolicies.grafana.integreatly.org
|
||||
spec:
|
||||
group: grafana.integreatly.org
|
||||
names:
|
||||
categories:
|
||||
- grafana-operator
|
||||
kind: GrafanaNotificationPolicy
|
||||
listKind: GrafanaNotificationPolicyList
|
||||
plural: grafananotificationpolicies
|
||||
singular: grafananotificationpolicy
|
||||
scope: Namespaced
|
||||
versions:
|
||||
- name: v1beta1
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
description: GrafanaNotificationPolicy is the Schema for the GrafanaNotificationPolicy
|
||||
API
|
||||
properties:
|
||||
apiVersion:
|
||||
description: |-
|
||||
APIVersion defines the versioned schema of this representation of an object.
|
||||
Servers should convert recognized schemas to the latest internal value, and
|
||||
may reject unrecognized values.
|
||||
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
|
||||
type: string
|
||||
kind:
|
||||
description: |-
|
||||
Kind is a string value representing the REST resource this object represents.
|
||||
Servers may infer this from the endpoint the client submits requests to.
|
||||
Cannot be updated.
|
||||
In CamelCase.
|
||||
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
|
||||
type: string
|
||||
metadata:
|
||||
type: object
|
||||
spec:
|
||||
description: GrafanaNotificationPolicySpec defines the desired state of
|
||||
GrafanaNotificationPolicy
|
||||
properties:
|
||||
editable:
|
||||
description: Whether to enable or disable editing of the notification
|
||||
policy in Grafana UI
|
||||
type: boolean
|
||||
x-kubernetes-validations:
|
||||
- message: Value is immutable
|
||||
rule: self == oldSelf
|
||||
instanceSelector:
|
||||
description: selects Grafanas for import
|
||||
properties:
|
||||
matchExpressions:
|
||||
description: matchExpressions is a list of label selector requirements.
|
||||
The requirements are ANDed.
|
||||
items:
|
||||
description: |-
|
||||
A label selector requirement is a selector that contains values, a key, and an operator that
|
||||
relates the key and values.
|
||||
properties:
|
||||
key:
|
||||
description: key is the label key that the selector applies
|
||||
to.
|
||||
type: string
|
||||
operator:
|
||||
description: |-
|
||||
operator represents a key's relationship to a set of values.
|
||||
Valid operators are In, NotIn, Exists and DoesNotExist.
|
||||
type: string
|
||||
values:
|
||||
description: |-
|
||||
values is an array of string values. If the operator is In or NotIn,
|
||||
the values array must be non-empty. If the operator is Exists or DoesNotExist,
|
||||
the values array must be empty. This array is replaced during a strategic
|
||||
merge patch.
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
x-kubernetes-list-type: atomic
|
||||
required:
|
||||
- key
|
||||
- operator
|
||||
type: object
|
||||
type: array
|
||||
x-kubernetes-list-type: atomic
|
||||
matchLabels:
|
||||
additionalProperties:
|
||||
type: string
|
||||
description: |-
|
||||
matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
|
||||
map is equivalent to an element of matchExpressions, whose key field is "key", the
|
||||
operator is "In", and the values array contains only "value". The requirements are ANDed.
|
||||
type: object
|
||||
type: object
|
||||
x-kubernetes-map-type: atomic
|
||||
x-kubernetes-validations:
|
||||
- message: Value is immutable
|
||||
rule: self == oldSelf
|
||||
resyncPeriod:
|
||||
default: 10m
|
||||
format: duration
|
||||
pattern: ^([0-9]+(\.[0-9]+)?(ns|us|µs|ms|s|m|h))+$
|
||||
type: string
|
||||
route:
|
||||
description: Routes for alerts to match against
|
||||
properties:
|
||||
continue:
|
||||
description: continue
|
||||
type: boolean
|
||||
group_by:
|
||||
description: group by
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
group_interval:
|
||||
description: group interval
|
||||
type: string
|
||||
group_wait:
|
||||
description: group wait
|
||||
type: string
|
||||
match_re:
|
||||
additionalProperties:
|
||||
type: string
|
||||
description: match re
|
||||
type: object
|
||||
matchers:
|
||||
description: matchers
|
||||
items:
|
||||
properties:
|
||||
isEqual:
|
||||
description: is equal
|
||||
type: boolean
|
||||
isRegex:
|
||||
description: is regex
|
||||
type: boolean
|
||||
name:
|
||||
description: name
|
||||
type: string
|
||||
value:
|
||||
description: value
|
||||
type: string
|
||||
required:
|
||||
- isRegex
|
||||
- value
|
||||
type: object
|
||||
type: array
|
||||
mute_time_intervals:
|
||||
description: mute time intervals
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
object_matchers:
|
||||
description: object matchers
|
||||
items:
|
||||
description: |-
|
||||
ObjectMatcher ObjectMatcher is a matcher that can be used to filter alerts.
|
||||
|
||||
swagger:model ObjectMatcher
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
type: array
|
||||
provenance:
|
||||
description: provenance
|
||||
type: string
|
||||
receiver:
|
||||
description: receiver
|
||||
type: string
|
||||
repeat_interval:
|
||||
description: repeat interval
|
||||
type: string
|
||||
routes:
|
||||
description: routes
|
||||
x-kubernetes-preserve-unknown-fields: true
|
||||
type: object
|
||||
required:
|
||||
- instanceSelector
|
||||
- route
|
||||
type: object
|
||||
status:
|
||||
description: GrafanaNotificationPolicyStatus defines the observed state
|
||||
of GrafanaNotificationPolicy
|
||||
properties:
|
||||
conditions:
|
||||
items:
|
||||
description: Condition contains details for one aspect of the current
|
||||
state of this API Resource.
|
||||
properties:
|
||||
lastTransitionTime:
|
||||
description: |-
|
||||
lastTransitionTime is the last time the condition transitioned from one status to another.
|
||||
This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable.
|
||||
format: date-time
|
||||
type: string
|
||||
message:
|
||||
description: |-
|
||||
message is a human readable message indicating details about the transition.
|
||||
This may be an empty string.
|
||||
maxLength: 32768
|
||||
type: string
|
||||
observedGeneration:
|
||||
description: |-
|
||||
observedGeneration represents the .metadata.generation that the condition was set based upon.
|
||||
For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date
|
||||
with respect to the current state of the instance.
|
||||
format: int64
|
||||
minimum: 0
|
||||
type: integer
|
||||
reason:
|
||||
description: |-
|
||||
reason contains a programmatic identifier indicating the reason for the condition's last transition.
|
||||
Producers of specific condition types may define expected values and meanings for this field,
|
||||
and whether the values are considered a guaranteed API.
|
||||
The value should be a CamelCase string.
|
||||
This field may not be empty.
|
||||
maxLength: 1024
|
||||
minLength: 1
|
||||
pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$
|
||||
type: string
|
||||
status:
|
||||
description: status of the condition, one of True, False, Unknown.
|
||||
enum:
|
||||
- "True"
|
||||
- "False"
|
||||
- Unknown
|
||||
type: string
|
||||
type:
|
||||
description: type of condition in CamelCase or in foo.example.com/CamelCase.
|
||||
maxLength: 316
|
||||
pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$
|
||||
type: string
|
||||
required:
|
||||
- lastTransitionTime
|
||||
- message
|
||||
- reason
|
||||
- status
|
||||
- type
|
||||
type: object
|
||||
type: array
|
||||
required:
|
||||
- conditions
|
||||
type: object
|
||||
type: object
|
||||
served: true
|
||||
storage: true
|
||||
subresources:
|
||||
status: {}
|
File diff suppressed because it is too large
Load Diff
69
manifests/grafana-operator/base/deployment.yaml
Normal file
69
manifests/grafana-operator/base/deployment.yaml
Normal file
@ -0,0 +1,69 @@
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/component: controller
|
||||
name: controller-manager
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/component: controller
|
||||
strategy: {}
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/component: controller
|
||||
spec:
|
||||
containers:
|
||||
- args:
|
||||
- --health-probe-bind-address=:8081
|
||||
- --metrics-bind-address=0.0.0.0:9090
|
||||
- --leader-elect
|
||||
image: ghcr.io/grafana/grafana-operator:v5.15.1
|
||||
imagePullPolicy: Always
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /healthz
|
||||
port: 8081
|
||||
initialDelaySeconds: 15
|
||||
periodSeconds: 20
|
||||
name: manager
|
||||
ports:
|
||||
- containerPort: 9090
|
||||
name: metrics
|
||||
protocol: TCP
|
||||
- containerPort: 8888
|
||||
name: pprof
|
||||
protocol: TCP
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /readyz
|
||||
port: 8081
|
||||
initialDelaySeconds: 5
|
||||
periodSeconds: 10
|
||||
resources:
|
||||
limits:
|
||||
cpu: 200m
|
||||
memory: 256Mi
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 20Mi
|
||||
securityContext:
|
||||
allowPrivilegeEscalation: false
|
||||
capabilities:
|
||||
drop:
|
||||
- ALL
|
||||
readOnlyRootFilesystem: true
|
||||
runAsNonRoot: true
|
||||
volumeMounts:
|
||||
- mountPath: /tmp/dashboards
|
||||
name: dashboards-dir
|
||||
securityContext:
|
||||
runAsNonRoot: true
|
||||
serviceAccountName: controller-manager
|
||||
terminationGracePeriodSeconds: 10
|
||||
volumes:
|
||||
- emptyDir: {}
|
||||
name: dashboards-dir
|
63
manifests/grafana-operator/base/kustomization.yaml
Normal file
63
manifests/grafana-operator/base/kustomization.yaml
Normal file
@ -0,0 +1,63 @@
|
||||
---
|
||||
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
|
||||
# crds:
|
||||
# # - crd/CustomResourceDefinition-grafanaalertrulegroups.yaml
|
||||
# - crd/CustomResourceDefinition-grafanacontactpoints.yaml
|
||||
# - crd/CustomResourceDefinition-grafanadashboards.yaml
|
||||
# - crd/CustomResourceDefinition-grafanadatasources.yaml
|
||||
# - crd/CustomResourceDefinition-grafanafolders.yaml
|
||||
# - crd/CustomResourceDefinition-grafananotificationpolicies.yaml
|
||||
# - crd/CustomResourceDefinition-grafanas.yaml
|
||||
|
||||
|
||||
namespace: grafana
|
||||
|
||||
namePrefix: grafana-operator-
|
||||
|
||||
|
||||
labels:
|
||||
- includeSelectors: true
|
||||
pairs:
|
||||
app.kubernetes.io/instance: cluster
|
||||
app.kubernetes.io/name: grafana-operator
|
||||
app.kubernetes.io/part-of: grafana-operator
|
||||
|
||||
|
||||
resources:
|
||||
- crd/CustomResourceDefinition-grafanaalertrulegroups.yaml
|
||||
- crd/CustomResourceDefinition-grafanacontactpoints.yaml
|
||||
- crd/CustomResourceDefinition-grafanadashboards.yaml
|
||||
- crd/CustomResourceDefinition-grafanadatasources.yaml
|
||||
- crd/CustomResourceDefinition-grafanafolders.yaml
|
||||
- crd/CustomResourceDefinition-grafananotificationpolicies.yaml
|
||||
- crd/CustomResourceDefinition-grafanas.yaml
|
||||
- serviceaccount.yaml
|
||||
- clusterrole.yaml
|
||||
- clusterrolebinding.yaml
|
||||
- deployment.yaml
|
||||
|
||||
|
||||
replacements:
|
||||
- source:
|
||||
kind: Deployment
|
||||
name: controller-manager
|
||||
fieldPath: metadata.namespace
|
||||
targets:
|
||||
- select:
|
||||
kind: ClusterRoleBinding
|
||||
name: controller-manager
|
||||
fieldPaths:
|
||||
- subjects.[name=controller-manager].namespace
|
||||
|
||||
patches:
|
||||
- target:
|
||||
group: apiextensions.k8s.io
|
||||
version: v1
|
||||
kind: CustomResourceDefinition
|
||||
patch: |-
|
||||
- op: add
|
||||
path: /metadata/annotations/argocd.argoproj.io~1sync-options
|
||||
value: ServerSideApply=true
|
8
manifests/grafana-operator/base/serviceaccount.yaml
Normal file
8
manifests/grafana-operator/base/serviceaccount.yaml
Normal file
@ -0,0 +1,8 @@
|
||||
---
|
||||
apiVersion: v1
|
||||
automountServiceAccountToken: true
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/component: controller
|
||||
name: controller-manager
|
@ -0,0 +1,17 @@
|
||||
---
|
||||
|
||||
apiVersion: kustomize.config.k8s.io/v1alpha1
|
||||
kind: Component
|
||||
|
||||
|
||||
labels:
|
||||
- includeSelectors: true
|
||||
pairs:
|
||||
app.kubernetes.io/instance: namespace
|
||||
app.kubernetes.io/name: grafana-operator
|
||||
app.kubernetes.io/part-of: grafana-operator
|
||||
|
||||
|
||||
resources:
|
||||
- service.yaml
|
||||
- servicemonitor.yaml
|
20
manifests/grafana-operator/components/metrics/service.yaml
Normal file
20
manifests/grafana-operator/components/metrics/service.yaml
Normal file
@ -0,0 +1,20 @@
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/component: controller
|
||||
name: grafana-operator-controller-manager-metrics
|
||||
spec:
|
||||
ports:
|
||||
- name: metrics
|
||||
port: 9090
|
||||
protocol: TCP
|
||||
targetPort: metrics
|
||||
- name: pprof
|
||||
port: 8888
|
||||
protocol: TCP
|
||||
targetPort: pprof
|
||||
selector:
|
||||
app.kubernetes.io/component: controller
|
||||
type: ClusterIP
|
@ -0,0 +1,21 @@
|
||||
---
|
||||
apiVersion: monitoring.coreos.com/v1
|
||||
kind: ServiceMonitor
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/component: controller
|
||||
name: grafana-operator-controller-manager
|
||||
spec:
|
||||
endpoints:
|
||||
- interval: 30s
|
||||
port: metrics
|
||||
relabelings:
|
||||
- action: replace
|
||||
regex: (.*)
|
||||
replacement: $1
|
||||
sourceLabels:
|
||||
- __meta_kubernetes_pod_name
|
||||
targetLabel: instance
|
||||
selector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/component: controller
|
@ -0,0 +1,19 @@
|
||||
---
|
||||
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
|
||||
|
||||
namespace: grafana
|
||||
|
||||
|
||||
images:
|
||||
- name: ghcr.io/grafana/grafana-operator
|
||||
newTag: v5.15.1
|
||||
|
||||
|
||||
resources:
|
||||
- ../../base
|
||||
|
||||
components:
|
||||
- ../../components/metrics
|
23
manifests/grafana-operator/source/README.md
Normal file
23
manifests/grafana-operator/source/README.md
Normal file
@ -0,0 +1,23 @@
|
||||
# Grafana Operator
|
||||
|
||||
|
||||
## Updating Manifests
|
||||
|
||||
1. download new `cluster scoped` manifest https://github.com/grafana/grafana-operator/releases
|
||||
|
||||
1. remove **ALL** namespaces from manifests
|
||||
|
||||
!!! tip
|
||||
VSCode:
|
||||
1. `ctrl-h` to bring up search
|
||||
1. use search string `\n\s\snamespace:.+` and set to regex search (click on `.*` button)
|
||||
1. leave the replace field empty
|
||||
1. click on replace all
|
||||
|
||||
1. Delete any manifest that is of kind `namespace`
|
||||
|
||||
1. Copy each manifest into their own file at path `base/`
|
||||
|
||||
!!! tip
|
||||
If there are `ClusterRoleBinding` manifests, ensure that `kustomization.yaml` has its replacements section updated to update the service accounts namespace.
|
||||
|
11470
manifests/grafana-operator/source/kustomize-cluster_scoped.yaml
Normal file
11470
manifests/grafana-operator/source/kustomize-cluster_scoped.yaml
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user