mirror of https://github.com/grafana/loki
operator: Provide community operator bundle (#7308)
Co-authored-by: Robert Jacob <rojacob@redhat.com>pull/8525/head^2
parent
0394b56368
commit
099ca230b1
@ -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,24 @@ |
|||||||
|
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-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,32 @@ |
|||||||
|
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: |
||||||
|
lokiStackGateway: true |
||||||
|
runtimeSeccompProfile: false |
||||||
|
# |
||||||
|
# Webhook feature gates |
||||||
|
# |
||||||
|
lokiStackWebhook: true |
||||||
|
alertingRuleWebhook: true |
||||||
|
recordingRuleWebhook: 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,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,194 @@ |
|||||||
|
apiVersion: apiextensions.k8s.io/v1 |
||||||
|
kind: CustomResourceDefinition |
||||||
|
metadata: |
||||||
|
annotations: |
||||||
|
controller-gen.kubebuilder.io/version: v0.10.0 |
||||||
|
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: |
||||||
|
group: loki.grafana.com |
||||||
|
names: |
||||||
|
kind: AlertingRule |
||||||
|
listKind: AlertingRuleList |
||||||
|
plural: alertingrules |
||||||
|
singular: alertingrule |
||||||
|
scope: Namespaced |
||||||
|
versions: |
||||||
|
- 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: true |
||||||
|
storage: true |
||||||
|
subresources: |
||||||
|
status: {} |
||||||
|
status: |
||||||
|
acceptedNames: |
||||||
|
kind: "" |
||||||
|
plural: "" |
||||||
|
conditions: null |
||||||
|
storedVersions: null |
||||||
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,178 @@ |
|||||||
|
apiVersion: apiextensions.k8s.io/v1 |
||||||
|
kind: CustomResourceDefinition |
||||||
|
metadata: |
||||||
|
annotations: |
||||||
|
controller-gen.kubebuilder.io/version: v0.10.0 |
||||||
|
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: |
||||||
|
group: loki.grafana.com |
||||||
|
names: |
||||||
|
kind: RecordingRule |
||||||
|
listKind: RecordingRuleList |
||||||
|
plural: recordingrules |
||||||
|
singular: recordingrule |
||||||
|
scope: Namespaced |
||||||
|
versions: |
||||||
|
- 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: true |
||||||
|
storage: true |
||||||
|
subresources: |
||||||
|
status: {} |
||||||
|
status: |
||||||
|
acceptedNames: |
||||||
|
kind: "" |
||||||
|
plural: "" |
||||||
|
conditions: null |
||||||
|
storedVersions: null |
||||||
@ -0,0 +1,693 @@ |
|||||||
|
apiVersion: apiextensions.k8s.io/v1 |
||||||
|
kind: CustomResourceDefinition |
||||||
|
metadata: |
||||||
|
annotations: |
||||||
|
controller-gen.kubebuilder.io/version: v0.10.0 |
||||||
|
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: rulerconfigs.loki.grafana.com |
||||||
|
spec: |
||||||
|
group: loki.grafana.com |
||||||
|
names: |
||||||
|
kind: RulerConfig |
||||||
|
listKind: RulerConfigList |
||||||
|
plural: rulerconfigs |
||||||
|
singular: rulerconfig |
||||||
|
scope: Namespaced |
||||||
|
versions: |
||||||
|
- name: v1beta1 |
||||||
|
schema: |
||||||
|
openAPIV3Schema: |
||||||
|
description: RulerConfig is the Schema for the rulerconfigs 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: RulerConfigSpec defines the desired state of Ruler |
||||||
|
properties: |
||||||
|
alertmanager: |
||||||
|
description: Defines alert manager configuration to notify on firing |
||||||
|
alerts. |
||||||
|
properties: |
||||||
|
client: |
||||||
|
description: Client configuration for reaching the alertmanager |
||||||
|
endpoint. |
||||||
|
properties: |
||||||
|
basicAuth: |
||||||
|
description: Basic authentication configuration for reaching |
||||||
|
the alertmanager endpoints. |
||||||
|
properties: |
||||||
|
password: |
||||||
|
description: The subject's password for the basic authentication |
||||||
|
configuration. |
||||||
|
type: string |
||||||
|
username: |
||||||
|
description: The subject's username for the basic authentication |
||||||
|
configuration. |
||||||
|
type: string |
||||||
|
type: object |
||||||
|
headerAuth: |
||||||
|
description: Header authentication configuration for reaching |
||||||
|
the alertmanager endpoints. |
||||||
|
properties: |
||||||
|
credentials: |
||||||
|
description: The credentials for the header authentication |
||||||
|
configuration. |
||||||
|
type: string |
||||||
|
credentialsFile: |
||||||
|
description: The credentials file for the Header authentication |
||||||
|
configuration. It is mutually exclusive with `credentials`. |
||||||
|
type: string |
||||||
|
type: |
||||||
|
description: The authentication type for the header authentication |
||||||
|
configuration. |
||||||
|
type: string |
||||||
|
type: object |
||||||
|
tls: |
||||||
|
description: TLS configuration for reaching the alertmanager |
||||||
|
endpoints. |
||||||
|
properties: |
||||||
|
caPath: |
||||||
|
description: The CA certificate file path for the TLS |
||||||
|
configuration. |
||||||
|
type: string |
||||||
|
certPath: |
||||||
|
description: The client-side certificate file path for |
||||||
|
the TLS configuration. |
||||||
|
type: string |
||||||
|
keyPath: |
||||||
|
description: The client-side key file path for the TLS |
||||||
|
configuration. |
||||||
|
type: string |
||||||
|
serverName: |
||||||
|
description: The server name to validate in the alertmanager |
||||||
|
server certificates. |
||||||
|
type: string |
||||||
|
type: object |
||||||
|
type: object |
||||||
|
discovery: |
||||||
|
description: Defines the configuration for DNS-based discovery |
||||||
|
of AlertManager hosts. |
||||||
|
properties: |
||||||
|
enableSRV: |
||||||
|
description: Use DNS SRV records to discover Alertmanager |
||||||
|
hosts. |
||||||
|
type: boolean |
||||||
|
refreshInterval: |
||||||
|
default: 1m |
||||||
|
description: How long to wait between refreshing DNS resolutions |
||||||
|
of Alertmanager hosts. |
||||||
|
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 |
||||||
|
type: object |
||||||
|
enableV2: |
||||||
|
description: If enabled, then requests to Alertmanager use the |
||||||
|
v2 API. |
||||||
|
type: boolean |
||||||
|
endpoints: |
||||||
|
description: List of AlertManager URLs to send notifications to. |
||||||
|
Each Alertmanager URL is treated as a separate group in the |
||||||
|
configuration. Multiple Alertmanagers in HA per group can be |
||||||
|
supported by using DNS resolution (See EnableDNSDiscovery). |
||||||
|
items: |
||||||
|
type: string |
||||||
|
type: array |
||||||
|
externalLabels: |
||||||
|
additionalProperties: |
||||||
|
type: string |
||||||
|
description: Additional labels to add to all alerts. |
||||||
|
type: object |
||||||
|
externalUrl: |
||||||
|
description: URL for alerts return path. |
||||||
|
type: string |
||||||
|
notificationQueue: |
||||||
|
description: Defines the configuration for the notification queue |
||||||
|
to AlertManager hosts. |
||||||
|
properties: |
||||||
|
capacity: |
||||||
|
default: 10000 |
||||||
|
description: Capacity of the queue for notifications to be |
||||||
|
sent to the Alertmanager. |
||||||
|
format: int32 |
||||||
|
type: integer |
||||||
|
forGracePeriod: |
||||||
|
default: 10m |
||||||
|
description: Minimum duration between alert and restored "for" |
||||||
|
state. This is maintained only for alerts with configured |
||||||
|
"for" time greater than the grace period. |
||||||
|
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 |
||||||
|
forOutageTolerance: |
||||||
|
default: 1h |
||||||
|
description: Max time to tolerate outage for restoring "for" |
||||||
|
state of alert. |
||||||
|
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 |
||||||
|
resendDelay: |
||||||
|
default: 1m |
||||||
|
description: Minimum amount of time to wait before resending |
||||||
|
an alert to Alertmanager. |
||||||
|
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 |
||||||
|
timeout: |
||||||
|
default: 10s |
||||||
|
description: HTTP timeout duration when sending notifications |
||||||
|
to the Alertmanager. |
||||||
|
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 |
||||||
|
type: object |
||||||
|
relabelConfigs: |
||||||
|
description: List of alert relabel configurations. |
||||||
|
items: |
||||||
|
description: 'RelabelConfig allows dynamic rewriting of the |
||||||
|
label set, being applied to samples before ingestion. It defines |
||||||
|
`<metric_relabel_configs>` and `<alert_relabel_configs>` sections |
||||||
|
of Prometheus configuration. More info: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#metric_relabel_configs' |
||||||
|
properties: |
||||||
|
action: |
||||||
|
default: replace |
||||||
|
description: Action to perform based on regex matching. |
||||||
|
Default is 'replace' |
||||||
|
enum: |
||||||
|
- drop |
||||||
|
- hashmod |
||||||
|
- keep |
||||||
|
- labeldrop |
||||||
|
- labelkeep |
||||||
|
- labelmap |
||||||
|
- replace |
||||||
|
type: string |
||||||
|
modulus: |
||||||
|
description: Modulus to take of the hash of the source label |
||||||
|
values. |
||||||
|
format: int64 |
||||||
|
type: integer |
||||||
|
regex: |
||||||
|
default: (.*) |
||||||
|
description: Regular expression against which the extracted |
||||||
|
value is matched. Default is '(.*)' |
||||||
|
type: string |
||||||
|
replacement: |
||||||
|
default: $1 |
||||||
|
description: Replacement value against which a regex replace |
||||||
|
is performed if the regular expression matches. Regex |
||||||
|
capture groups are available. Default is '$1' |
||||||
|
type: string |
||||||
|
separator: |
||||||
|
default: ; |
||||||
|
description: Separator placed between concatenated source |
||||||
|
label values. default is ';'. |
||||||
|
type: string |
||||||
|
sourceLabels: |
||||||
|
description: The source labels select values from existing |
||||||
|
labels. Their content is concatenated using the configured |
||||||
|
separator and matched against the configured regular expression |
||||||
|
for the replace, keep, and drop actions. |
||||||
|
items: |
||||||
|
type: string |
||||||
|
type: array |
||||||
|
targetLabel: |
||||||
|
description: Label to which the resulting value is written |
||||||
|
in a replace action. It is mandatory for replace actions. |
||||||
|
Regex capture groups are available. |
||||||
|
type: string |
||||||
|
required: |
||||||
|
- sourceLabels |
||||||
|
type: object |
||||||
|
type: array |
||||||
|
required: |
||||||
|
- endpoints |
||||||
|
type: object |
||||||
|
evaluationInterval: |
||||||
|
default: 1m |
||||||
|
description: Interval on how frequently to evaluate rules. |
||||||
|
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 |
||||||
|
overrides: |
||||||
|
additionalProperties: |
||||||
|
description: RulerOverrides defines the overrides applied per-tenant. |
||||||
|
properties: |
||||||
|
alertmanager: |
||||||
|
description: AlertManagerOverrides defines the overrides to |
||||||
|
apply to the alertmanager config. |
||||||
|
properties: |
||||||
|
client: |
||||||
|
description: Client configuration for reaching the alertmanager |
||||||
|
endpoint. |
||||||
|
properties: |
||||||
|
basicAuth: |
||||||
|
description: Basic authentication configuration for |
||||||
|
reaching the alertmanager endpoints. |
||||||
|
properties: |
||||||
|
password: |
||||||
|
description: The subject's password for the basic |
||||||
|
authentication configuration. |
||||||
|
type: string |
||||||
|
username: |
||||||
|
description: The subject's username for the basic |
||||||
|
authentication configuration. |
||||||
|
type: string |
||||||
|
type: object |
||||||
|
headerAuth: |
||||||
|
description: Header authentication configuration for |
||||||
|
reaching the alertmanager endpoints. |
||||||
|
properties: |
||||||
|
credentials: |
||||||
|
description: The credentials for the header authentication |
||||||
|
configuration. |
||||||
|
type: string |
||||||
|
credentialsFile: |
||||||
|
description: The credentials file for the Header |
||||||
|
authentication configuration. It is mutually exclusive |
||||||
|
with `credentials`. |
||||||
|
type: string |
||||||
|
type: |
||||||
|
description: The authentication type for the header |
||||||
|
authentication configuration. |
||||||
|
type: string |
||||||
|
type: object |
||||||
|
tls: |
||||||
|
description: TLS configuration for reaching the alertmanager |
||||||
|
endpoints. |
||||||
|
properties: |
||||||
|
caPath: |
||||||
|
description: The CA certificate file path for the |
||||||
|
TLS configuration. |
||||||
|
type: string |
||||||
|
certPath: |
||||||
|
description: The client-side certificate file path |
||||||
|
for the TLS configuration. |
||||||
|
type: string |
||||||
|
keyPath: |
||||||
|
description: The client-side key file path for the |
||||||
|
TLS configuration. |
||||||
|
type: string |
||||||
|
serverName: |
||||||
|
description: The server name to validate in the |
||||||
|
alertmanager server certificates. |
||||||
|
type: string |
||||||
|
type: object |
||||||
|
type: object |
||||||
|
discovery: |
||||||
|
description: Defines the configuration for DNS-based discovery |
||||||
|
of AlertManager hosts. |
||||||
|
properties: |
||||||
|
enableSRV: |
||||||
|
description: Use DNS SRV records to discover Alertmanager |
||||||
|
hosts. |
||||||
|
type: boolean |
||||||
|
refreshInterval: |
||||||
|
default: 1m |
||||||
|
description: How long to wait between refreshing DNS |
||||||
|
resolutions of Alertmanager hosts. |
||||||
|
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 |
||||||
|
type: object |
||||||
|
enableV2: |
||||||
|
description: If enabled, then requests to Alertmanager use |
||||||
|
the v2 API. |
||||||
|
type: boolean |
||||||
|
endpoints: |
||||||
|
description: List of AlertManager URLs to send notifications |
||||||
|
to. Each Alertmanager URL is treated as a separate group |
||||||
|
in the configuration. Multiple Alertmanagers in HA per |
||||||
|
group can be supported by using DNS resolution (See EnableDNSDiscovery). |
||||||
|
items: |
||||||
|
type: string |
||||||
|
type: array |
||||||
|
externalLabels: |
||||||
|
additionalProperties: |
||||||
|
type: string |
||||||
|
description: Additional labels to add to all alerts. |
||||||
|
type: object |
||||||
|
externalUrl: |
||||||
|
description: URL for alerts return path. |
||||||
|
type: string |
||||||
|
notificationQueue: |
||||||
|
description: Defines the configuration for the notification |
||||||
|
queue to AlertManager hosts. |
||||||
|
properties: |
||||||
|
capacity: |
||||||
|
default: 10000 |
||||||
|
description: Capacity of the queue for notifications |
||||||
|
to be sent to the Alertmanager. |
||||||
|
format: int32 |
||||||
|
type: integer |
||||||
|
forGracePeriod: |
||||||
|
default: 10m |
||||||
|
description: Minimum duration between alert and restored |
||||||
|
"for" state. This is maintained only for alerts with |
||||||
|
configured "for" time greater than the grace period. |
||||||
|
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 |
||||||
|
forOutageTolerance: |
||||||
|
default: 1h |
||||||
|
description: Max time to tolerate outage for restoring |
||||||
|
"for" state of alert. |
||||||
|
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 |
||||||
|
resendDelay: |
||||||
|
default: 1m |
||||||
|
description: Minimum amount of time to wait before resending |
||||||
|
an alert to Alertmanager. |
||||||
|
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 |
||||||
|
timeout: |
||||||
|
default: 10s |
||||||
|
description: HTTP timeout duration when sending notifications |
||||||
|
to the Alertmanager. |
||||||
|
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 |
||||||
|
type: object |
||||||
|
relabelConfigs: |
||||||
|
description: List of alert relabel configurations. |
||||||
|
items: |
||||||
|
description: 'RelabelConfig allows dynamic rewriting of |
||||||
|
the label set, being applied to samples before ingestion. |
||||||
|
It defines `<metric_relabel_configs>` and `<alert_relabel_configs>` |
||||||
|
sections of Prometheus configuration. More info: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#metric_relabel_configs' |
||||||
|
properties: |
||||||
|
action: |
||||||
|
default: replace |
||||||
|
description: Action to perform based on regex matching. |
||||||
|
Default is 'replace' |
||||||
|
enum: |
||||||
|
- drop |
||||||
|
- hashmod |
||||||
|
- keep |
||||||
|
- labeldrop |
||||||
|
- labelkeep |
||||||
|
- labelmap |
||||||
|
- replace |
||||||
|
type: string |
||||||
|
modulus: |
||||||
|
description: Modulus to take of the hash of the source |
||||||
|
label values. |
||||||
|
format: int64 |
||||||
|
type: integer |
||||||
|
regex: |
||||||
|
default: (.*) |
||||||
|
description: Regular expression against which the |
||||||
|
extracted value is matched. Default is '(.*)' |
||||||
|
type: string |
||||||
|
replacement: |
||||||
|
default: $1 |
||||||
|
description: Replacement value against which a regex |
||||||
|
replace is performed if the regular expression matches. |
||||||
|
Regex capture groups are available. Default is '$1' |
||||||
|
type: string |
||||||
|
separator: |
||||||
|
default: ; |
||||||
|
description: Separator placed between concatenated |
||||||
|
source label values. default is ';'. |
||||||
|
type: string |
||||||
|
sourceLabels: |
||||||
|
description: The source labels select values from |
||||||
|
existing labels. Their content is concatenated using |
||||||
|
the configured separator and matched against the |
||||||
|
configured regular expression for the replace, keep, |
||||||
|
and drop actions. |
||||||
|
items: |
||||||
|
type: string |
||||||
|
type: array |
||||||
|
targetLabel: |
||||||
|
description: Label to which the resulting value is |
||||||
|
written in a replace action. It is mandatory for |
||||||
|
replace actions. Regex capture groups are available. |
||||||
|
type: string |
||||||
|
required: |
||||||
|
- sourceLabels |
||||||
|
type: object |
||||||
|
type: array |
||||||
|
required: |
||||||
|
- endpoints |
||||||
|
type: object |
||||||
|
type: object |
||||||
|
description: Overrides defines the config overrides to be applied |
||||||
|
per-tenant. |
||||||
|
type: object |
||||||
|
pollInterval: |
||||||
|
default: 1m |
||||||
|
description: Interval on how frequently to poll for new rule definitions. |
||||||
|
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 |
||||||
|
remoteWrite: |
||||||
|
description: Defines a remote write endpoint to write recording rule |
||||||
|
metrics. |
||||||
|
properties: |
||||||
|
client: |
||||||
|
description: Defines the configuration for remote write client. |
||||||
|
properties: |
||||||
|
additionalHeaders: |
||||||
|
additionalProperties: |
||||||
|
type: string |
||||||
|
description: Additional HTTP headers to be sent along with |
||||||
|
each remote write request. |
||||||
|
type: object |
||||||
|
authorization: |
||||||
|
description: Type of authorzation to use to access the remote |
||||||
|
write endpoint |
||||||
|
enum: |
||||||
|
- basic |
||||||
|
- header |
||||||
|
type: string |
||||||
|
authorizationSecretName: |
||||||
|
description: Name of a secret in the namespace configured |
||||||
|
for authorization secrets. |
||||||
|
type: string |
||||||
|
followRedirects: |
||||||
|
default: true |
||||||
|
description: Configure whether HTTP requests follow HTTP 3xx |
||||||
|
redirects. |
||||||
|
type: boolean |
||||||
|
name: |
||||||
|
description: Name of the remote write config, which if specified |
||||||
|
must be unique among remote write configs. |
||||||
|
type: string |
||||||
|
proxyUrl: |
||||||
|
description: Optional proxy URL. |
||||||
|
type: string |
||||||
|
relabelConfigs: |
||||||
|
description: List of remote write relabel configurations. |
||||||
|
items: |
||||||
|
description: 'RelabelConfig allows dynamic rewriting of |
||||||
|
the label set, being applied to samples before ingestion. |
||||||
|
It defines `<metric_relabel_configs>` and `<alert_relabel_configs>` |
||||||
|
sections of Prometheus configuration. More info: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#metric_relabel_configs' |
||||||
|
properties: |
||||||
|
action: |
||||||
|
default: replace |
||||||
|
description: Action to perform based on regex matching. |
||||||
|
Default is 'replace' |
||||||
|
enum: |
||||||
|
- drop |
||||||
|
- hashmod |
||||||
|
- keep |
||||||
|
- labeldrop |
||||||
|
- labelkeep |
||||||
|
- labelmap |
||||||
|
- replace |
||||||
|
type: string |
||||||
|
modulus: |
||||||
|
description: Modulus to take of the hash of the source |
||||||
|
label values. |
||||||
|
format: int64 |
||||||
|
type: integer |
||||||
|
regex: |
||||||
|
default: (.*) |
||||||
|
description: Regular expression against which the extracted |
||||||
|
value is matched. Default is '(.*)' |
||||||
|
type: string |
||||||
|
replacement: |
||||||
|
default: $1 |
||||||
|
description: Replacement value against which a regex |
||||||
|
replace is performed if the regular expression matches. |
||||||
|
Regex capture groups are available. Default is '$1' |
||||||
|
type: string |
||||||
|
separator: |
||||||
|
default: ; |
||||||
|
description: Separator placed between concatenated source |
||||||
|
label values. default is ';'. |
||||||
|
type: string |
||||||
|
sourceLabels: |
||||||
|
description: The source labels select values from existing |
||||||
|
labels. Their content is concatenated using the configured |
||||||
|
separator and matched against the configured regular |
||||||
|
expression for the replace, keep, and drop actions. |
||||||
|
items: |
||||||
|
type: string |
||||||
|
type: array |
||||||
|
targetLabel: |
||||||
|
description: Label to which the resulting value is written |
||||||
|
in a replace action. It is mandatory for replace actions. |
||||||
|
Regex capture groups are available. |
||||||
|
type: string |
||||||
|
required: |
||||||
|
- sourceLabels |
||||||
|
type: object |
||||||
|
type: array |
||||||
|
timeout: |
||||||
|
default: 30s |
||||||
|
description: Timeout for requests to the remote write endpoint. |
||||||
|
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 |
||||||
|
url: |
||||||
|
description: The URL of the endpoint to send samples to. |
||||||
|
type: string |
||||||
|
required: |
||||||
|
- authorization |
||||||
|
- authorizationSecretName |
||||||
|
- name |
||||||
|
- url |
||||||
|
type: object |
||||||
|
enabled: |
||||||
|
description: Enable remote-write functionality. |
||||||
|
type: boolean |
||||||
|
queue: |
||||||
|
description: Defines the configuration for remote write client |
||||||
|
queue. |
||||||
|
properties: |
||||||
|
batchSendDeadline: |
||||||
|
default: 5s |
||||||
|
description: Maximum time a sample will wait in buffer. |
||||||
|
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 |
||||||
|
capacity: |
||||||
|
default: 2500 |
||||||
|
description: Number of samples to buffer per shard before |
||||||
|
we block reading of more |
||||||
|
format: int32 |
||||||
|
type: integer |
||||||
|
maxBackOffPeriod: |
||||||
|
default: 100ms |
||||||
|
description: Maximum retry delay. |
||||||
|
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 |
||||||
|
maxSamplesPerSend: |
||||||
|
default: 500 |
||||||
|
description: Maximum number of samples per send. |
||||||
|
format: int32 |
||||||
|
type: integer |
||||||
|
maxShards: |
||||||
|
default: 200 |
||||||
|
description: Maximum number of shards, i.e. amount of concurrency. |
||||||
|
format: int32 |
||||||
|
type: integer |
||||||
|
minBackOffPeriod: |
||||||
|
default: 30ms |
||||||
|
description: Initial retry delay. Gets doubled for every retry. |
||||||
|
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 |
||||||
|
minShards: |
||||||
|
default: 200 |
||||||
|
description: Minimum number of shards, i.e. amount of concurrency. |
||||||
|
format: int32 |
||||||
|
type: integer |
||||||
|
type: object |
||||||
|
refreshPeriod: |
||||||
|
default: 10s |
||||||
|
description: Minimum period to wait between refreshing remote-write |
||||||
|
reconfigurations. |
||||||
|
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 |
||||||
|
type: object |
||||||
|
type: object |
||||||
|
status: |
||||||
|
description: RulerConfigStatus defines the observed state of RulerConfig |
||||||
|
properties: |
||||||
|
conditions: |
||||||
|
description: Conditions of the RulerConfig 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: {} |
||||||
|
status: |
||||||
|
acceptedNames: |
||||||
|
kind: "" |
||||||
|
plural: "" |
||||||
|
conditions: null |
||||||
|
storedVersions: null |
||||||
@ -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 |
||||||
|
- ../../samples |
||||||
|
- ../../scorecard |
||||||
@ -1,4 +0,0 @@ |
|||||||
resources: |
|
||||||
- ../overlays/openshift |
|
||||||
- ../samples |
|
||||||
- ../scorecard |
|
||||||
@ -0,0 +1,4 @@ |
|||||||
|
resources: |
||||||
|
- ../../overlays/openshift |
||||||
|
- ../../samples |
||||||
|
- ../../scorecard |
||||||
@ -0,0 +1,25 @@ |
|||||||
|
apiVersion: apps/v1 |
||||||
|
kind: Deployment |
||||||
|
metadata: |
||||||
|
name: controller-manager |
||||||
|
spec: |
||||||
|
template: |
||||||
|
spec: |
||||||
|
containers: |
||||||
|
- name: kube-rbac-proxy |
||||||
|
image: quay.io/openshift/origin-kube-rbac-proxy:latest |
||||||
|
args: |
||||||
|
- "--secure-listen-address=0.0.0.0:8443" |
||||||
|
- "--upstream=http://127.0.0.1:8080/" |
||||||
|
- "--logtostderr=true" |
||||||
|
- "--v=0" |
||||||
|
ports: |
||||||
|
- containerPort: 8443 |
||||||
|
name: https |
||||||
|
securityContext: |
||||||
|
allowPrivilegeEscalation: false |
||||||
|
capabilities: |
||||||
|
drop: |
||||||
|
- ALL |
||||||
|
securityContext: |
||||||
|
runAsNonRoot: true |
||||||
@ -0,0 +1,14 @@ |
|||||||
|
# Prometheus Monitor Service (Metrics) |
||||||
|
apiVersion: monitoring.coreos.com/v1 |
||||||
|
kind: ServiceMonitor |
||||||
|
metadata: |
||||||
|
labels: |
||||||
|
name: loki-operator |
||||||
|
name: metrics-monitor |
||||||
|
spec: |
||||||
|
endpoints: |
||||||
|
- path: /metrics |
||||||
|
targetPort: 8443 |
||||||
|
scheme: http |
||||||
|
interval: 30s |
||||||
|
scrapeTimeout: 10s |
||||||
@ -1,38 +0,0 @@ |
|||||||
# This patch inject a sidecar container which is a HTTP proxy for the |
|
||||||
# controller manager, it performs RBAC authorization against the Kubernetes API using SubjectAccessReviews. |
|
||||||
apiVersion: apps/v1 |
|
||||||
kind: Deployment |
|
||||||
metadata: |
|
||||||
name: controller-manager |
|
||||||
spec: |
|
||||||
template: |
|
||||||
spec: |
|
||||||
containers: |
|
||||||
- name: kube-rbac-proxy |
|
||||||
image: gcr.io/kubebuilder/kube-rbac-proxy:v0.11.0 |
|
||||||
args: |
|
||||||
- "--secure-listen-address=0.0.0.0:8443" |
|
||||||
- "--upstream=http://127.0.0.1:8080/" |
|
||||||
- "--logtostderr=true" |
|
||||||
- "--tls-cert-file=/var/run/secrets/serving-cert/tls.crt" |
|
||||||
- "--tls-private-key-file=/var/run/secrets/serving-cert/tls.key" |
|
||||||
- "--v=0" |
|
||||||
ports: |
|
||||||
- containerPort: 8443 |
|
||||||
name: https |
|
||||||
volumeMounts: |
|
||||||
- mountPath: /var/run/secrets/serving-cert |
|
||||||
name: loki-operator-metrics-cert |
|
||||||
securityContext: |
|
||||||
allowPrivilegeEscalation: false |
|
||||||
capabilities: |
|
||||||
drop: |
|
||||||
- ALL |
|
||||||
volumes: |
|
||||||
- name: loki-operator-metrics-cert |
|
||||||
secret: |
|
||||||
defaultMode: 420 |
|
||||||
optional: true |
|
||||||
secretName: loki-operator-metrics |
|
||||||
securityContext: |
|
||||||
runAsNonRoot: true |
|
||||||
@ -1,18 +0,0 @@ |
|||||||
# Prometheus Monitor Service (Metrics) |
|
||||||
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.loki-operator.svc |
|
||||||
@ -0,0 +1,51 @@ |
|||||||
|
Thanks submitting your Operator. Please check below list before you create your Pull Request. |
||||||
|
|
||||||
|
### New Submissions |
||||||
|
|
||||||
|
* [ ] Are you familiar with our [contribution guidelines](https://github.com/operator-framework/community-operators/blob/master/docs/contributing-via-pr.md)? |
||||||
|
* [ ] Have you [packaged and deployed](https://github.com/operator-framework/community-operators/blob/master/docs/testing-operators.md) your Operator for Operator Framework? |
||||||
|
* [ ] Have you tested your Operator with all Custom Resource Definitions? |
||||||
|
* [ ] Have you tested your Operator in all supported [installation modes](https://github.com/operator-framework/operator-lifecycle-manager/blob/master/doc/design/building-your-csv.md#operator-metadata)? |
||||||
|
* [ ] Have you considered whether you want use [semantic versioning order](https://github.com/operator-framework/community-operators/blob/master/docs/operator-ci-yaml.md#semver-mode)? |
||||||
|
* [ ] Is your submission [signed](https://github.com/operator-framework/community-operators/blob/master/docs/contributing-prerequisites.md#sign-your-work)? |
||||||
|
* [ ] Is operator [icon](https://github.com/operator-framework/community-operators/blob/master/docs/packaging-operator.md#operator-icon) set? |
||||||
|
|
||||||
|
### Updates to existing Operators |
||||||
|
|
||||||
|
* [ ] Did you create a `ci.yaml` file according to the [update instructions](https://github.com/operator-framework/community-operators/blob/master/docs/operator-ci-yaml.md)? |
||||||
|
* [ ] Is your new CSV pointing to the previous version with the `replaces` property if you chose `replaces-mode` via the `updateGraph` property in `ci.yaml`? |
||||||
|
* [ ] Is your new CSV referenced in the [appropriate channel](https://github.com/operator-framework/community-operators/blob/master/docs/packaging-operator.md#channels) defined in the `package.yaml` or `annotations.yaml` ? |
||||||
|
* [ ] Have you tested an update to your Operator when deployed via OLM? |
||||||
|
* [ ] Is your submission [signed](https://github.com/operator-framework/community-operators/blob/master/docs/contributing-prerequisites.md#sign-your-work)? |
||||||
|
|
||||||
|
### Your submission should not |
||||||
|
|
||||||
|
* [ ] Modify more than one operator |
||||||
|
* [ ] Modify an Operator you don't own |
||||||
|
* [ ] Rename an operator - please remove and add with a different name instead |
||||||
|
* [ ] Submit operators to both `upstream-community-operators` and `community-operators` at once |
||||||
|
* [ ] Modify any files outside the above mentioned folders |
||||||
|
* [ ] Contain more than one commit. **Please squash your commits.** |
||||||
|
|
||||||
|
### Operator Description must contain (in order) |
||||||
|
|
||||||
|
1. [ ] Description about the managed Application and where to find more information |
||||||
|
2. [ ] Features and capabilities of your Operator and how to use it |
||||||
|
3. [ ] Any manual steps about potential pre-requisites for using your Operator |
||||||
|
|
||||||
|
### Operator Metadata should contain |
||||||
|
|
||||||
|
* [ ] Human readable name and 1-liner description about your Operator |
||||||
|
* [ ] Valid [category name](https://github.com/operator-framework/community-operators/blob/master/docs/packaging-operator.md#categories)<sup>1</sup> |
||||||
|
* [ ] One of the pre-defined [capability levels](https://github.com/operator-framework/operator-courier/blob/4d1a25d2c8d52f7de6297ec18d8afd6521236aa2/operatorcourier/validate.py#L556)<sup>2</sup> |
||||||
|
* [ ] Links to the maintainer, source code and documentation |
||||||
|
* [ ] Example templates for all Custom Resource Definitions intended to be used |
||||||
|
* [ ] A quadratic logo |
||||||
|
|
||||||
|
Remember that you can preview your CSV [here](https://operatorhub.io/preview). |
||||||
|
|
||||||
|
-- |
||||||
|
|
||||||
|
<sup>1</sup> If you feel your Operator does not fit any of the pre-defined categories, file an issue against this repo and explain your need |
||||||
|
|
||||||
|
<sup>2</sup> For more information see [here](https://sdk.operatorframework.io/docs/overview/#operator-capability-level) |
||||||
@ -0,0 +1,71 @@ |
|||||||
|
#!/usr/bin/env bash |
||||||
|
|
||||||
|
set -e -u -o pipefail |
||||||
|
|
||||||
|
COMMUNITY_OPERATORS_REPOSITORY="k8s-operatorhub/community-operators" |
||||||
|
UPSTREAM_REPOSITORY="redhat-openshift-ecosystem/community-operators-prod" |
||||||
|
LOCAL_REPOSITORIES_PATH=${LOCAL_REPOSITORIES_PATH:-"$(dirname "$(dirname "$(dirname "$(pwd)")")")"} |
||||||
|
|
||||||
|
if [[ ! -d "${LOCAL_REPOSITORIES_PATH}/${COMMUNITY_OPERATORS_REPOSITORY}" ]]; then |
||||||
|
echo "${LOCAL_REPOSITORIES_PATH}/${COMMUNITY_OPERATORS_REPOSITORY} doesn't exist, aborting." |
||||||
|
exit 1 |
||||||
|
fi |
||||||
|
|
||||||
|
if [[ ! -d "${LOCAL_REPOSITORIES_PATH}/${UPSTREAM_REPOSITORY}" ]]; then |
||||||
|
echo "${LOCAL_REPOSITORIES_PATH}/${UPSTREAM_REPOSITORY} doesn't exist, aborting." |
||||||
|
exit 1 |
||||||
|
fi |
||||||
|
|
||||||
|
SOURCE_DIR=$(pwd) |
||||||
|
VERSION=$(grep "VERSION ?= " Makefile | awk -F= '{print $3}' | xargs) |
||||||
|
|
||||||
|
for dest in ${COMMUNITY_OPERATORS_REPOSITORY} ${UPSTREAM_REPOSITORY}; do |
||||||
|
( |
||||||
|
cd "${LOCAL_REPOSITORIES_PATH}/${dest}" || exit |
||||||
|
|
||||||
|
if ! git remote | grep upstream > /dev/null; |
||||||
|
then |
||||||
|
echo "Cannot find a remote named 'upstream'. Adding one." |
||||||
|
git remote add upstream "git@github.com:${dest}.git" |
||||||
|
fi |
||||||
|
|
||||||
|
git fetch -q upstream |
||||||
|
git checkout -q main |
||||||
|
git rebase -q upstream/main |
||||||
|
|
||||||
|
mkdir -p "operators/loki-operator/${VERSION}" |
||||||
|
cp -r "${SOURCE_DIR}/bundle/community"/* "operators/loki-operator/${VERSION}/" |
||||||
|
rm "operators/loki-operator/${VERSION}/bundle.Dockerfile" |
||||||
|
|
||||||
|
if [[ "${dest}" = "${UPSTREAM_REPOSITORY}" ]]; then |
||||||
|
python3 - << END |
||||||
|
import os, yaml |
||||||
|
with open("./operators/loki-operator/${VERSION}/metadata/annotations.yaml", 'r') as f: |
||||||
|
y=yaml.safe_load(f) or {} |
||||||
|
y['annotations']['com.redhat.openshift.versions'] = os.getenv('SUPPORTED_OCP_VERSIONS') |
||||||
|
with open("./operators/loki-operator/${VERSION}/metadata/annotations.yaml", 'w') as f: |
||||||
|
yaml.dump(y, f) |
||||||
|
END |
||||||
|
fi |
||||||
|
|
||||||
|
if ! git checkout -q -b "update-loki-operator-to-${VERSION}"; |
||||||
|
then |
||||||
|
echo "Cannot switch to the new branch update-loki-operator-${dest}-to-${VERSION}. Aborting" |
||||||
|
exit 1 |
||||||
|
fi |
||||||
|
|
||||||
|
git add . |
||||||
|
git commit -sqm "Update loki-operator to v${VERSION}" |
||||||
|
|
||||||
|
if ! command -v gh > /dev/null; |
||||||
|
then |
||||||
|
echo "'gh' command not found, can't submit the PR on your behalf." |
||||||
|
exit 0 |
||||||
|
fi |
||||||
|
|
||||||
|
echo "Submitting PR on your behalf via 'gh'" |
||||||
|
gh pr create --title "Update loki-operator to v${VERSION}" --body-file "${SOURCE_DIR}/hack/.checked-pr-template.md" |
||||||
|
) |
||||||
|
done |
||||||
|
|
||||||
|
echo "Completed." |
||||||
Loading…
Reference in new issue