mirror of https://github.com/grafana/loki
operator: Provide community bundle for openshift community hub (#8881)
parent
1c012d6a26
commit
99acb9b345
@ -0,0 +1,21 @@ |
||||
FROM scratch |
||||
|
||||
# Core bundle labels. |
||||
LABEL operators.operatorframework.io.bundle.mediatype.v1=registry+v1 |
||||
LABEL operators.operatorframework.io.bundle.manifests.v1=manifests/ |
||||
LABEL operators.operatorframework.io.bundle.metadata.v1=metadata/ |
||||
LABEL operators.operatorframework.io.bundle.package.v1=loki-operator |
||||
LABEL operators.operatorframework.io.bundle.channels.v1=alpha |
||||
LABEL operators.operatorframework.io.bundle.channel.default.v1=alpha |
||||
LABEL operators.operatorframework.io.metrics.builder=operator-sdk-unknown |
||||
LABEL operators.operatorframework.io.metrics.mediatype.v1=metrics+v1 |
||||
LABEL operators.operatorframework.io.metrics.project_layout=go.kubebuilder.io/v3 |
||||
|
||||
# Labels for testing. |
||||
LABEL operators.operatorframework.io.test.mediatype.v1=scorecard+v1 |
||||
LABEL operators.operatorframework.io.test.config.v1=tests/scorecard/ |
||||
|
||||
# Copy files to locations specified by labels. |
||||
COPY ./manifests /manifests/ |
||||
COPY ./metadata /metadata/ |
||||
COPY ./tests/scorecard /tests/scorecard/ |
||||
@ -0,0 +1,26 @@ |
||||
apiVersion: v1 |
||||
kind: Service |
||||
metadata: |
||||
annotations: |
||||
service.beta.openshift.io/serving-cert-secret-name: loki-operator-metrics |
||||
creationTimestamp: null |
||||
labels: |
||||
app.kubernetes.io/instance: loki-operator-v0.1.0 |
||||
app.kubernetes.io/managed-by: operator-lifecycle-manager |
||||
app.kubernetes.io/name: loki-operator |
||||
app.kubernetes.io/part-of: loki-operator |
||||
app.kubernetes.io/version: 0.1.0 |
||||
name: loki-operator-controller-manager-metrics-service |
||||
spec: |
||||
ports: |
||||
- name: https |
||||
port: 8443 |
||||
protocol: TCP |
||||
targetPort: https |
||||
selector: |
||||
app.kubernetes.io/managed-by: operator-lifecycle-manager |
||||
app.kubernetes.io/name: loki-operator |
||||
app.kubernetes.io/part-of: loki-operator |
||||
name: loki-operator-controller-manager |
||||
status: |
||||
loadBalancer: {} |
||||
@ -0,0 +1,67 @@ |
||||
apiVersion: v1 |
||||
data: |
||||
controller_manager_config.yaml: | |
||||
apiVersion: config.loki.grafana.com/v1 |
||||
kind: ProjectConfig |
||||
health: |
||||
healthProbeBindAddress: :8081 |
||||
metrics: |
||||
bindAddress: 127.0.0.1:8080 |
||||
webhook: |
||||
port: 9443 |
||||
leaderElection: |
||||
leaderElect: false |
||||
resourceName: e3716011.grafana.com |
||||
featureGates: |
||||
# |
||||
# Monitoring feature gates |
||||
# |
||||
serviceMonitors: true |
||||
serviceMonitorTlsEndpoints: true |
||||
lokiStackAlerts: true |
||||
# |
||||
# Encryption feature gates |
||||
# |
||||
httpEncryption: true |
||||
grpcEncryption: true |
||||
builtInCertManagement: |
||||
enabled: true |
||||
# CA certificate validity: 5 years |
||||
caValidity: 43830h |
||||
# CA certificate refresh at 80% of validity |
||||
caRefresh: 35064h |
||||
# Target certificate validity: 90d |
||||
certValidity: 2160h |
||||
# Target certificate refresh at 80% of validity |
||||
certRefresh: 1728h |
||||
# |
||||
# Component feature gates |
||||
# |
||||
lokiStackGateway: true |
||||
runtimeSeccompProfile: true |
||||
defaultNodeAffinity: true |
||||
# |
||||
# Webhook feature gates |
||||
# |
||||
lokiStackWebhook: true |
||||
alertingRuleWebhook: true |
||||
recordingRuleWebhook: true |
||||
rulerConfigWebhook: true |
||||
# |
||||
# OpenShift feature gates |
||||
# |
||||
openshift: |
||||
servingCertsService: true |
||||
gatewayRoute: true |
||||
ruleExtendedValidation: true |
||||
clusterTLSPolicy: true |
||||
clusterProxy: true |
||||
kind: ConfigMap |
||||
metadata: |
||||
labels: |
||||
app.kubernetes.io/instance: loki-operator-v0.1.0 |
||||
app.kubernetes.io/managed-by: operator-lifecycle-manager |
||||
app.kubernetes.io/name: loki-operator |
||||
app.kubernetes.io/part-of: loki-operator |
||||
app.kubernetes.io/version: 0.1.0 |
||||
name: loki-operator-manager-config |
||||
@ -0,0 +1,25 @@ |
||||
apiVersion: monitoring.coreos.com/v1 |
||||
kind: ServiceMonitor |
||||
metadata: |
||||
labels: |
||||
app.kubernetes.io/instance: loki-operator-v0.1.0 |
||||
app.kubernetes.io/managed-by: operator-lifecycle-manager |
||||
app.kubernetes.io/name: loki-operator |
||||
app.kubernetes.io/part-of: loki-operator |
||||
app.kubernetes.io/version: 0.1.0 |
||||
name: loki-operator |
||||
name: loki-operator-metrics-monitor |
||||
spec: |
||||
endpoints: |
||||
- bearerTokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token |
||||
interval: 30s |
||||
path: /metrics |
||||
scheme: https |
||||
scrapeTimeout: 10s |
||||
targetPort: 8443 |
||||
tlsConfig: |
||||
caFile: /etc/prometheus/configmaps/serving-certs-ca-bundle/service-ca.crt |
||||
serverName: loki-operator-controller-manager-metrics-service.kubernetes-operators.svc |
||||
selector: |
||||
matchLabels: |
||||
app.kubernetes.io/name: loki-operator |
||||
@ -0,0 +1,16 @@ |
||||
apiVersion: rbac.authorization.k8s.io/v1 |
||||
kind: ClusterRole |
||||
metadata: |
||||
creationTimestamp: null |
||||
labels: |
||||
app.kubernetes.io/instance: loki-operator-v0.1.0 |
||||
app.kubernetes.io/managed-by: operator-lifecycle-manager |
||||
app.kubernetes.io/name: loki-operator |
||||
app.kubernetes.io/part-of: loki-operator |
||||
app.kubernetes.io/version: 0.1.0 |
||||
name: loki-operator-metrics-reader |
||||
rules: |
||||
- nonResourceURLs: |
||||
- /metrics |
||||
verbs: |
||||
- get |
||||
@ -0,0 +1,25 @@ |
||||
apiVersion: rbac.authorization.k8s.io/v1 |
||||
kind: Role |
||||
metadata: |
||||
annotations: |
||||
include.release.openshift.io/self-managed-high-availability: "true" |
||||
include.release.openshift.io/single-node-developer: "true" |
||||
creationTimestamp: null |
||||
labels: |
||||
app.kubernetes.io/instance: loki-operator-v0.1.0 |
||||
app.kubernetes.io/managed-by: operator-lifecycle-manager |
||||
app.kubernetes.io/name: loki-operator |
||||
app.kubernetes.io/part-of: loki-operator |
||||
app.kubernetes.io/version: 0.1.0 |
||||
name: loki-operator-prometheus |
||||
rules: |
||||
- apiGroups: |
||||
- "" |
||||
resources: |
||||
- services |
||||
- endpoints |
||||
- pods |
||||
verbs: |
||||
- get |
||||
- list |
||||
- watch |
||||
@ -0,0 +1,22 @@ |
||||
apiVersion: rbac.authorization.k8s.io/v1 |
||||
kind: RoleBinding |
||||
metadata: |
||||
annotations: |
||||
include.release.openshift.io/self-managed-high-availability: "true" |
||||
include.release.openshift.io/single-node-developer: "true" |
||||
creationTimestamp: null |
||||
labels: |
||||
app.kubernetes.io/instance: loki-operator-v0.1.0 |
||||
app.kubernetes.io/managed-by: operator-lifecycle-manager |
||||
app.kubernetes.io/name: loki-operator |
||||
app.kubernetes.io/part-of: loki-operator |
||||
app.kubernetes.io/version: 0.1.0 |
||||
name: loki-operator-prometheus |
||||
roleRef: |
||||
apiGroup: rbac.authorization.k8s.io |
||||
kind: Role |
||||
name: loki-operator-prometheus |
||||
subjects: |
||||
- kind: ServiceAccount |
||||
name: prometheus-k8s |
||||
namespace: openshift-monitoring |
||||
@ -0,0 +1,22 @@ |
||||
apiVersion: v1 |
||||
kind: Service |
||||
metadata: |
||||
creationTimestamp: null |
||||
labels: |
||||
app.kubernetes.io/instance: loki-operator-v0.1.0 |
||||
app.kubernetes.io/managed-by: operator-lifecycle-manager |
||||
app.kubernetes.io/name: loki-operator |
||||
app.kubernetes.io/part-of: loki-operator |
||||
app.kubernetes.io/version: 0.1.0 |
||||
name: loki-operator-webhook-service |
||||
spec: |
||||
ports: |
||||
- port: 443 |
||||
protocol: TCP |
||||
targetPort: 9443 |
||||
selector: |
||||
app.kubernetes.io/managed-by: operator-lifecycle-manager |
||||
app.kubernetes.io/name: loki-operator |
||||
app.kubernetes.io/part-of: loki-operator |
||||
status: |
||||
loadBalancer: {} |
||||
File diff suppressed because one or more lines are too long
@ -0,0 +1,372 @@ |
||||
apiVersion: apiextensions.k8s.io/v1 |
||||
kind: CustomResourceDefinition |
||||
metadata: |
||||
annotations: |
||||
controller-gen.kubebuilder.io/version: v0.11.3 |
||||
creationTimestamp: null |
||||
labels: |
||||
app.kubernetes.io/instance: loki-operator-v0.1.0 |
||||
app.kubernetes.io/managed-by: operator-lifecycle-manager |
||||
app.kubernetes.io/name: loki-operator |
||||
app.kubernetes.io/part-of: loki-operator |
||||
app.kubernetes.io/version: 0.1.0 |
||||
name: alertingrules.loki.grafana.com |
||||
spec: |
||||
conversion: |
||||
strategy: Webhook |
||||
webhook: |
||||
clientConfig: |
||||
service: |
||||
name: loki-operator-webhook-service |
||||
namespace: kubernetes-operators |
||||
path: /convert |
||||
port: 443 |
||||
conversionReviewVersions: |
||||
- v1 |
||||
- v1beta1 |
||||
group: loki.grafana.com |
||||
names: |
||||
kind: AlertingRule |
||||
listKind: AlertingRuleList |
||||
plural: alertingrules |
||||
singular: alertingrule |
||||
scope: Namespaced |
||||
versions: |
||||
- name: v1 |
||||
schema: |
||||
openAPIV3Schema: |
||||
description: AlertingRule is the Schema for the alertingrules 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: AlertingRuleSpec defines the desired state of AlertingRule |
||||
properties: |
||||
groups: |
||||
description: List of groups for alerting rules. |
||||
items: |
||||
description: AlertingRuleGroup defines a group of Loki alerting |
||||
rules. |
||||
properties: |
||||
interval: |
||||
default: 1m |
||||
description: Interval defines the time interval between evaluation |
||||
of the given alerting rule. |
||||
pattern: ((([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?|0) |
||||
type: string |
||||
limit: |
||||
description: Limit defines the number of alerts an alerting |
||||
rule can produce. 0 is no limit. |
||||
format: int32 |
||||
type: integer |
||||
name: |
||||
description: Name of the alerting rule group. Must be unique |
||||
within all alerting rules. |
||||
type: string |
||||
rules: |
||||
description: Rules defines a list of alerting rules |
||||
items: |
||||
description: AlertingRuleGroupSpec defines the spec for a |
||||
Loki alerting rule. |
||||
properties: |
||||
alert: |
||||
description: The name of the alert. Must be a valid label |
||||
value. |
||||
type: string |
||||
annotations: |
||||
additionalProperties: |
||||
type: string |
||||
description: Annotations to add to each alert. |
||||
type: object |
||||
expr: |
||||
description: The LogQL expression to evaluate. Every evaluation |
||||
cycle this is evaluated at the current time, and all |
||||
resultant time series become pending/firing alerts. |
||||
type: string |
||||
for: |
||||
description: Alerts are considered firing once they have |
||||
been returned for this long. Alerts which have not yet |
||||
fired for long enough are considered pending. |
||||
pattern: ((([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?|0) |
||||
type: string |
||||
labels: |
||||
additionalProperties: |
||||
type: string |
||||
description: Labels to add to each alert. |
||||
type: object |
||||
required: |
||||
- expr |
||||
type: object |
||||
type: array |
||||
required: |
||||
- name |
||||
- rules |
||||
type: object |
||||
type: array |
||||
tenantID: |
||||
description: TenantID of tenant where the alerting rules are evaluated |
||||
in. |
||||
type: string |
||||
required: |
||||
- tenantID |
||||
type: object |
||||
status: |
||||
description: AlertingRuleStatus defines the observed state of AlertingRule |
||||
properties: |
||||
conditions: |
||||
description: Conditions of the AlertingRule generation health. |
||||
items: |
||||
description: "Condition contains details for one aspect of the current |
||||
state of this API Resource. --- This struct is intended for direct |
||||
use as an array at the field path .status.conditions. For example, |
||||
\n type FooStatus struct{ // Represents the observations of a |
||||
foo's current state. // Known .status.conditions.type are: \"Available\", |
||||
\"Progressing\", and \"Degraded\" // +patchMergeKey=type // +patchStrategy=merge |
||||
// +listType=map // +listMapKey=type Conditions []metav1.Condition |
||||
`json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\" |
||||
protobuf:\"bytes,1,rep,name=conditions\"` \n // other fields }" |
||||
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. |
||||
--- Many .condition.type values are consistent across resources |
||||
like Available, but because arbitrary conditions can be useful |
||||
(see .node.status.conditions), the ability to deconflict is |
||||
important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt) |
||||
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 |
||||
type: object |
||||
type: object |
||||
served: true |
||||
storage: true |
||||
subresources: |
||||
status: {} |
||||
- name: v1beta1 |
||||
schema: |
||||
openAPIV3Schema: |
||||
description: AlertingRule is the Schema for the alertingrules 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: AlertingRuleSpec defines the desired state of AlertingRule |
||||
properties: |
||||
groups: |
||||
description: List of groups for alerting rules. |
||||
items: |
||||
description: AlertingRuleGroup defines a group of Loki alerting |
||||
rules. |
||||
properties: |
||||
interval: |
||||
default: 1m |
||||
description: Interval defines the time interval between evaluation |
||||
of the given alerting rule. |
||||
pattern: ((([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?|0) |
||||
type: string |
||||
limit: |
||||
description: Limit defines the number of alerts an alerting |
||||
rule can produce. 0 is no limit. |
||||
format: int32 |
||||
type: integer |
||||
name: |
||||
description: Name of the alerting rule group. Must be unique |
||||
within all alerting rules. |
||||
type: string |
||||
rules: |
||||
description: Rules defines a list of alerting rules |
||||
items: |
||||
description: AlertingRuleGroupSpec defines the spec for a |
||||
Loki alerting rule. |
||||
properties: |
||||
alert: |
||||
description: The name of the alert. Must be a valid label |
||||
value. |
||||
type: string |
||||
annotations: |
||||
additionalProperties: |
||||
type: string |
||||
description: Annotations to add to each alert. |
||||
type: object |
||||
expr: |
||||
description: The LogQL expression to evaluate. Every evaluation |
||||
cycle this is evaluated at the current time, and all |
||||
resultant time series become pending/firing alerts. |
||||
type: string |
||||
for: |
||||
description: Alerts are considered firing once they have |
||||
been returned for this long. Alerts which have not yet |
||||
fired for long enough are considered pending. |
||||
pattern: ((([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?|0) |
||||
type: string |
||||
labels: |
||||
additionalProperties: |
||||
type: string |
||||
description: Labels to add to each alert. |
||||
type: object |
||||
required: |
||||
- expr |
||||
type: object |
||||
type: array |
||||
required: |
||||
- name |
||||
- rules |
||||
type: object |
||||
type: array |
||||
tenantID: |
||||
description: TenantID of tenant where the alerting rules are evaluated |
||||
in. |
||||
type: string |
||||
required: |
||||
- tenantID |
||||
type: object |
||||
status: |
||||
description: AlertingRuleStatus defines the observed state of AlertingRule |
||||
properties: |
||||
conditions: |
||||
description: Conditions of the AlertingRule generation health. |
||||
items: |
||||
description: "Condition contains details for one aspect of the current |
||||
state of this API Resource. --- This struct is intended for direct |
||||
use as an array at the field path .status.conditions. For example, |
||||
\n type FooStatus struct{ // Represents the observations of a |
||||
foo's current state. // Known .status.conditions.type are: \"Available\", |
||||
\"Progressing\", and \"Degraded\" // +patchMergeKey=type // +patchStrategy=merge |
||||
// +listType=map // +listMapKey=type Conditions []metav1.Condition |
||||
`json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\" |
||||
protobuf:\"bytes,1,rep,name=conditions\"` \n // other fields }" |
||||
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. |
||||
--- Many .condition.type values are consistent across resources |
||||
like Available, but because arbitrary conditions can be useful |
||||
(see .node.status.conditions), the ability to deconflict is |
||||
important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt) |
||||
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 |
||||
type: object |
||||
type: object |
||||
served: false |
||||
storage: false |
||||
subresources: |
||||
status: {} |
||||
status: |
||||
acceptedNames: |
||||
kind: "" |
||||
plural: "" |
||||
conditions: null |
||||
storedVersions: null |
||||
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,340 @@ |
||||
apiVersion: apiextensions.k8s.io/v1 |
||||
kind: CustomResourceDefinition |
||||
metadata: |
||||
annotations: |
||||
controller-gen.kubebuilder.io/version: v0.11.3 |
||||
creationTimestamp: null |
||||
labels: |
||||
app.kubernetes.io/instance: loki-operator-v0.1.0 |
||||
app.kubernetes.io/managed-by: operator-lifecycle-manager |
||||
app.kubernetes.io/name: loki-operator |
||||
app.kubernetes.io/part-of: loki-operator |
||||
app.kubernetes.io/version: 0.1.0 |
||||
name: recordingrules.loki.grafana.com |
||||
spec: |
||||
conversion: |
||||
strategy: Webhook |
||||
webhook: |
||||
clientConfig: |
||||
service: |
||||
name: loki-operator-webhook-service |
||||
namespace: kubernetes-operators |
||||
path: /convert |
||||
port: 443 |
||||
conversionReviewVersions: |
||||
- v1 |
||||
- v1beta1 |
||||
group: loki.grafana.com |
||||
names: |
||||
kind: RecordingRule |
||||
listKind: RecordingRuleList |
||||
plural: recordingrules |
||||
singular: recordingrule |
||||
scope: Namespaced |
||||
versions: |
||||
- name: v1 |
||||
schema: |
||||
openAPIV3Schema: |
||||
description: RecordingRule is the Schema for the recordingrules 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: RecordingRuleSpec defines the desired state of RecordingRule |
||||
properties: |
||||
groups: |
||||
description: List of groups for recording rules. |
||||
items: |
||||
description: RecordingRuleGroup defines a group of Loki recording |
||||
rules. |
||||
properties: |
||||
interval: |
||||
default: 1m |
||||
description: Interval defines the time interval between evaluation |
||||
of the given recoding rule. |
||||
pattern: ((([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?|0) |
||||
type: string |
||||
limit: |
||||
description: Limit defines the number of series a recording |
||||
rule can produce. 0 is no limit. |
||||
format: int32 |
||||
type: integer |
||||
name: |
||||
description: Name of the recording rule group. Must be unique |
||||
within all recording rules. |
||||
type: string |
||||
rules: |
||||
description: Rules defines a list of recording rules |
||||
items: |
||||
description: RecordingRuleGroupSpec defines the spec for a |
||||
Loki recording rule. |
||||
properties: |
||||
expr: |
||||
description: The LogQL expression to evaluate. Every evaluation |
||||
cycle this is evaluated at the current time, and all |
||||
resultant time series become pending/firing alerts. |
||||
type: string |
||||
record: |
||||
description: The name of the time series to output to. |
||||
Must be a valid metric name. |
||||
type: string |
||||
required: |
||||
- expr |
||||
type: object |
||||
type: array |
||||
required: |
||||
- name |
||||
- rules |
||||
type: object |
||||
type: array |
||||
tenantID: |
||||
description: TenantID of tenant where the recording rules are evaluated |
||||
in. |
||||
type: string |
||||
required: |
||||
- tenantID |
||||
type: object |
||||
status: |
||||
description: RecordingRuleStatus defines the observed state of RecordingRule |
||||
properties: |
||||
conditions: |
||||
description: Conditions of the RecordingRule generation health. |
||||
items: |
||||
description: "Condition contains details for one aspect of the current |
||||
state of this API Resource. --- This struct is intended for direct |
||||
use as an array at the field path .status.conditions. For example, |
||||
\n type FooStatus struct{ // Represents the observations of a |
||||
foo's current state. // Known .status.conditions.type are: \"Available\", |
||||
\"Progressing\", and \"Degraded\" // +patchMergeKey=type // +patchStrategy=merge |
||||
// +listType=map // +listMapKey=type Conditions []metav1.Condition |
||||
`json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\" |
||||
protobuf:\"bytes,1,rep,name=conditions\"` \n // other fields }" |
||||
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. |
||||
--- Many .condition.type values are consistent across resources |
||||
like Available, but because arbitrary conditions can be useful |
||||
(see .node.status.conditions), the ability to deconflict is |
||||
important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt) |
||||
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 |
||||
type: object |
||||
type: object |
||||
served: true |
||||
storage: true |
||||
subresources: |
||||
status: {} |
||||
- name: v1beta1 |
||||
schema: |
||||
openAPIV3Schema: |
||||
description: RecordingRule is the Schema for the recordingrules 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: RecordingRuleSpec defines the desired state of RecordingRule |
||||
properties: |
||||
groups: |
||||
description: List of groups for recording rules. |
||||
items: |
||||
description: RecordingRuleGroup defines a group of Loki recording |
||||
rules. |
||||
properties: |
||||
interval: |
||||
default: 1m |
||||
description: Interval defines the time interval between evaluation |
||||
of the given recoding rule. |
||||
pattern: ((([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?|0) |
||||
type: string |
||||
limit: |
||||
description: Limit defines the number of series a recording |
||||
rule can produce. 0 is no limit. |
||||
format: int32 |
||||
type: integer |
||||
name: |
||||
description: Name of the recording rule group. Must be unique |
||||
within all recording rules. |
||||
type: string |
||||
rules: |
||||
description: Rules defines a list of recording rules |
||||
items: |
||||
description: RecordingRuleGroupSpec defines the spec for a |
||||
Loki recording rule. |
||||
properties: |
||||
expr: |
||||
description: The LogQL expression to evaluate. Every evaluation |
||||
cycle this is evaluated at the current time, and all |
||||
resultant time series become pending/firing alerts. |
||||
type: string |
||||
record: |
||||
description: The name of the time series to output to. |
||||
Must be a valid metric name. |
||||
type: string |
||||
required: |
||||
- expr |
||||
type: object |
||||
type: array |
||||
required: |
||||
- name |
||||
- rules |
||||
type: object |
||||
type: array |
||||
tenantID: |
||||
description: TenantID of tenant where the recording rules are evaluated |
||||
in. |
||||
type: string |
||||
required: |
||||
- tenantID |
||||
type: object |
||||
status: |
||||
description: RecordingRuleStatus defines the observed state of RecordingRule |
||||
properties: |
||||
conditions: |
||||
description: Conditions of the RecordingRule generation health. |
||||
items: |
||||
description: "Condition contains details for one aspect of the current |
||||
state of this API Resource. --- This struct is intended for direct |
||||
use as an array at the field path .status.conditions. For example, |
||||
\n type FooStatus struct{ // Represents the observations of a |
||||
foo's current state. // Known .status.conditions.type are: \"Available\", |
||||
\"Progressing\", and \"Degraded\" // +patchMergeKey=type // +patchStrategy=merge |
||||
// +listType=map // +listMapKey=type Conditions []metav1.Condition |
||||
`json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\" |
||||
protobuf:\"bytes,1,rep,name=conditions\"` \n // other fields }" |
||||
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. |
||||
--- Many .condition.type values are consistent across resources |
||||
like Available, but because arbitrary conditions can be useful |
||||
(see .node.status.conditions), the ability to deconflict is |
||||
important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt) |
||||
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 |
||||
type: object |
||||
type: object |
||||
served: false |
||||
storage: false |
||||
subresources: |
||||
status: {} |
||||
status: |
||||
acceptedNames: |
||||
kind: "" |
||||
plural: "" |
||||
conditions: null |
||||
storedVersions: null |
||||
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,15 @@ |
||||
annotations: |
||||
# Core bundle annotations. |
||||
operators.operatorframework.io.bundle.mediatype.v1: registry+v1 |
||||
operators.operatorframework.io.bundle.manifests.v1: manifests/ |
||||
operators.operatorframework.io.bundle.metadata.v1: metadata/ |
||||
operators.operatorframework.io.bundle.package.v1: loki-operator |
||||
operators.operatorframework.io.bundle.channels.v1: alpha |
||||
operators.operatorframework.io.bundle.channel.default.v1: alpha |
||||
operators.operatorframework.io.metrics.builder: operator-sdk-unknown |
||||
operators.operatorframework.io.metrics.mediatype.v1: metrics+v1 |
||||
operators.operatorframework.io.metrics.project_layout: go.kubebuilder.io/v3 |
||||
|
||||
# Annotations for testing. |
||||
operators.operatorframework.io.test.mediatype.v1: scorecard+v1 |
||||
operators.operatorframework.io.test.config.v1: tests/scorecard/ |
||||
@ -0,0 +1,70 @@ |
||||
apiVersion: scorecard.operatorframework.io/v1alpha3 |
||||
kind: Configuration |
||||
metadata: |
||||
name: config |
||||
stages: |
||||
- parallel: true |
||||
tests: |
||||
- entrypoint: |
||||
- scorecard-test |
||||
- basic-check-spec |
||||
image: quay.io/operator-framework/scorecard-test:v1.4.0 |
||||
labels: |
||||
suite: basic |
||||
test: basic-check-spec-test |
||||
storage: |
||||
spec: |
||||
mountPath: {} |
||||
- entrypoint: |
||||
- scorecard-test |
||||
- olm-bundle-validation |
||||
image: quay.io/operator-framework/scorecard-test:v1.4.0 |
||||
labels: |
||||
suite: olm |
||||
test: olm-bundle-validation-test |
||||
storage: |
||||
spec: |
||||
mountPath: {} |
||||
- entrypoint: |
||||
- scorecard-test |
||||
- olm-crds-have-validation |
||||
image: quay.io/operator-framework/scorecard-test:v1.4.0 |
||||
labels: |
||||
suite: olm |
||||
test: olm-crds-have-validation-test |
||||
storage: |
||||
spec: |
||||
mountPath: {} |
||||
- entrypoint: |
||||
- scorecard-test |
||||
- olm-crds-have-resources |
||||
image: quay.io/operator-framework/scorecard-test:v1.4.0 |
||||
labels: |
||||
suite: olm |
||||
test: olm-crds-have-resources-test |
||||
storage: |
||||
spec: |
||||
mountPath: {} |
||||
- entrypoint: |
||||
- scorecard-test |
||||
- olm-spec-descriptors |
||||
image: quay.io/operator-framework/scorecard-test:v1.4.0 |
||||
labels: |
||||
suite: olm |
||||
test: olm-spec-descriptors-test |
||||
storage: |
||||
spec: |
||||
mountPath: {} |
||||
- entrypoint: |
||||
- scorecard-test |
||||
- olm-status-descriptors |
||||
image: quay.io/operator-framework/scorecard-test:v1.4.0 |
||||
labels: |
||||
suite: olm |
||||
test: olm-status-descriptors-test |
||||
storage: |
||||
spec: |
||||
mountPath: {} |
||||
storage: |
||||
spec: |
||||
mountPath: {} |
||||
File diff suppressed because one or more lines are too long
@ -0,0 +1,4 @@ |
||||
resources: |
||||
- ../../overlays/community-openshift |
||||
- ../../samples |
||||
- ../../scorecard |
||||
@ -0,0 +1,55 @@ |
||||
apiVersion: config.loki.grafana.com/v1 |
||||
kind: ProjectConfig |
||||
health: |
||||
healthProbeBindAddress: :8081 |
||||
metrics: |
||||
bindAddress: 127.0.0.1:8080 |
||||
webhook: |
||||
port: 9443 |
||||
leaderElection: |
||||
leaderElect: false |
||||
resourceName: e3716011.grafana.com |
||||
featureGates: |
||||
# |
||||
# Monitoring feature gates |
||||
# |
||||
serviceMonitors: true |
||||
serviceMonitorTlsEndpoints: true |
||||
lokiStackAlerts: true |
||||
# |
||||
# Encryption feature gates |
||||
# |
||||
httpEncryption: true |
||||
grpcEncryption: true |
||||
builtInCertManagement: |
||||
enabled: true |
||||
# CA certificate validity: 5 years |
||||
caValidity: 43830h |
||||
# CA certificate refresh at 80% of validity |
||||
caRefresh: 35064h |
||||
# Target certificate validity: 90d |
||||
certValidity: 2160h |
||||
# Target certificate refresh at 80% of validity |
||||
certRefresh: 1728h |
||||
# |
||||
# Component feature gates |
||||
# |
||||
lokiStackGateway: true |
||||
runtimeSeccompProfile: true |
||||
defaultNodeAffinity: true |
||||
# |
||||
# Webhook feature gates |
||||
# |
||||
lokiStackWebhook: true |
||||
alertingRuleWebhook: true |
||||
recordingRuleWebhook: true |
||||
rulerConfigWebhook: true |
||||
# |
||||
# OpenShift feature gates |
||||
# |
||||
openshift: |
||||
servingCertsService: true |
||||
gatewayRoute: true |
||||
ruleExtendedValidation: true |
||||
clusterTLSPolicy: true |
||||
clusterProxy: true |
||||
@ -0,0 +1,30 @@ |
||||
resources: |
||||
- ./../openshift |
||||
|
||||
# Adds namespace to all resources. |
||||
namespace: kubernetes-operators |
||||
|
||||
labels: |
||||
- pairs: |
||||
app.kubernetes.io/name: loki-operator |
||||
app.kubernetes.io/part-of: loki-operator |
||||
app.kubernetes.io/managed-by: operator-lifecycle-manager |
||||
includeSelectors: true |
||||
- pairs: |
||||
app.kubernetes.io/instance: loki-operator-v0.1.0 |
||||
app.kubernetes.io/version: "0.1.0" |
||||
|
||||
configMapGenerator: |
||||
- files: |
||||
- controller_manager_config.yaml |
||||
name: manager-config |
||||
behavior: replace |
||||
|
||||
patchesStrategicMerge: |
||||
- manager_related_image_patch.yaml |
||||
- prometheus_service_monitor_patch.yaml |
||||
|
||||
images: |
||||
- name: controller |
||||
newName: docker.io/grafana/loki-operator |
||||
newTag: main-39f2856 |
||||
@ -0,0 +1,16 @@ |
||||
apiVersion: apps/v1 |
||||
kind: Deployment |
||||
metadata: |
||||
name: controller-manager |
||||
spec: |
||||
template: |
||||
spec: |
||||
containers: |
||||
- name: manager |
||||
env: |
||||
- name: RELATED_IMAGE_LOKI |
||||
value: docker.io/grafana/loki:2.7.4 |
||||
- name: RELATED_IMAGE_GATEWAY |
||||
value: quay.io/observatorium/api:latest |
||||
- name: RELATED_IMAGE_OPA |
||||
value: quay.io/observatorium/opa-openshift:latest |
||||
@ -0,0 +1,17 @@ |
||||
apiVersion: monitoring.coreos.com/v1 |
||||
kind: ServiceMonitor |
||||
metadata: |
||||
labels: |
||||
name: loki-operator |
||||
name: metrics-monitor |
||||
spec: |
||||
endpoints: |
||||
- bearerTokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token |
||||
path: /metrics |
||||
targetPort: 8443 |
||||
scheme: https |
||||
interval: 30s |
||||
scrapeTimeout: 10s |
||||
tlsConfig: |
||||
caFile: /etc/prometheus/configmaps/serving-certs-ca-bundle/service-ca.crt |
||||
serverName: loki-operator-controller-manager-metrics-service.kubernetes-operators.svc |
||||
Loading…
Reference in new issue