-
Notifications
You must be signed in to change notification settings - Fork 175
feat(hack): add manifests to facilate manual testing #3452
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| apiVersion: kustomize.config.k8s.io/v1beta1 | ||
| kind: Kustomization | ||
| resources: | ||
| - ../../base | ||
|
|
||
| patches: | ||
| - patch: |- | ||
| - op: replace | ||
| path: /spec/pipelines/0/outputRefs/0 | ||
| value: dynamic-receiver | ||
| - op: add | ||
| path: /spec/outputs | ||
| value: | ||
| - name: dynamic-receiver | ||
| type: http | ||
| http: | ||
| url: http://dynamic-receiver.openshift-logging.svc:8080 | ||
| target: | ||
| kind: ClusterLogForwarder |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| apiVersion: kustomize.config.k8s.io/v1beta1 | ||
| kind: Kustomization | ||
| resources: | ||
| - ../../base | ||
|
|
||
| patches: | ||
| - patch: |- | ||
| - op: replace | ||
| path: /spec/pipelines/0/outputRefs/0 | ||
| value: http-receiver | ||
| - op: add | ||
| path: /spec/outputs | ||
| value: | ||
| - name: http-receiver | ||
| type: http | ||
| http: | ||
| url: http://http-receiver.openshift-logging.svc:8090 | ||
| target: | ||
| kind: ClusterLogForwarder |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| apiVersion: kustomize.config.k8s.io/v1beta1 | ||
| kind: Kustomization | ||
| resources: | ||
| - ../../base | ||
|
|
||
| patches: | ||
| - patch: |- | ||
| - op: replace | ||
| path: /spec/pipelines/0/outputRefs/0 | ||
| value: http-receiver | ||
| - op: add | ||
| path: /spec/outputs | ||
| value: | ||
| - name: http-receiver | ||
| type: http | ||
| http: | ||
| url: http://loadbalancer.openshift-logging.svc:8888 | ||
| target: | ||
| kind: ClusterLogForwarder |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| apiVersion: kustomize.config.k8s.io/v1beta1 | ||
| kind: Kustomization | ||
| resources: | ||
| - ../../../base | ||
|
|
||
| patches: | ||
| - patch: |- | ||
| - op: replace | ||
| path: /spec/pipelines/0/outputRefs/0 | ||
| value: rsyslog | ||
| - op: add | ||
| path: /spec/outputs | ||
| value: | ||
| - name: rsyslog | ||
| type: syslog | ||
| syslog: | ||
| tuning: | ||
| deliveryMode: AtLeastOnce | ||
| url: 'udp://rsyslog-service.openshift-logging.svc.cluster.local:514' | ||
| rfc: RFC5424 | ||
| facility: local0 | ||
| enrichment: KubernetesMinimal | ||
| appName: '{.systemd.u.SYSLOG_IDENTIFIER||.log_type||"-"}' | ||
| procId: '{.systemd.t.PID||"-"}' | ||
| msgId: '{.systemd.u.MESSAGE_ID||"-"}' | ||
| target: | ||
| kind: ClusterLogForwarder |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| apiVersion: kustomize.config.k8s.io/v1beta1 | ||
| kind: Kustomization | ||
| namespace: test-workload | ||
| labels: | ||
| - pairs: | ||
| app.kubernetes.io/name: log-generator | ||
| app.kubernetes.io/component: log-generator | ||
| app.kubernetes.io/part-of: cluster-logging | ||
| includeSelectors: true | ||
| includeTemplates: true | ||
| resources: | ||
| - namespace.yaml | ||
| - log_generator_deployment.yaml | ||
| - servicemonitor.yaml | ||
| - service.yaml |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| apiVersion: apps/v1 | ||
| kind: Deployment | ||
| metadata: | ||
| name: log-generator | ||
| spec: | ||
| replicas: 1 | ||
| template: | ||
| spec: | ||
| containers: | ||
| - name: log-generator | ||
| env: | ||
| - name: LOGS_PER_SECOND | ||
| value: "1" | ||
| - name: PAYLOAD_SIZE | ||
| value: "512" | ||
| image: quay.io/openshift-logging/cluster-logging-load-client:latest | ||
| imagePullPolicy: Always | ||
| args: | ||
| - --logs-per-second=$(LOGS_PER_SECOND) | ||
| - --synthetic-payload-size=$(PAYLOAD_SIZE) | ||
| - --log-type=synthetic | ||
| ports: | ||
| - containerPort: 8081 | ||
| name: metrics | ||
| protocol: TCP | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| apiVersion: v1 | ||
| kind: Namespace | ||
| metadata: | ||
| name: test-workload | ||
| spec: | ||
| finalizers: | ||
| - kubernetes |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| apiVersion: v1 | ||
| kind: Service | ||
| metadata: | ||
| name: log-generator | ||
| spec: | ||
| ports: | ||
| - name: metrics | ||
| port: 8081 | ||
| protocol: TCP | ||
| targetPort: metrics | ||
|
Comment on lines
+5
to
+10
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win 🔎 Supported by static analysis🏁 Script executed: #!/bin/bash
set -euo pipefail
kubectl -n test-workload get endpointslice \
-l kubernetes.io/service-name=log-generatorRepository: openshift/cluster-logging-operator Length of output: 217 🏁 Script executed: #!/bin/bash
set -euo pipefail
printf '%s\n' '--- candidate files ---'
git ls-files 'hack/manifests/log-generator/**'
printf '%s\n' '--- service manifest ---'
cat -n hack/manifests/log-generator/base/service.yaml
printf '%s\n' '--- related workload and kustomization references ---'
rg -n -C 4 'log-generator|metrics|selector:|app:' hack/manifests/log-generatorRepository: openshift/cluster-logging-operator Length of output: 5397 🏁 Script executed: #!/bin/bash
set -euo pipefail
printf '%s\n' '--- base kustomization ---'
cat -n hack/manifests/log-generator/base/kustomization.yaml
printf '%s\n' '--- deployment ---'
cat -n hack/manifests/log-generator/base/log_generator_deployment.yaml
printf '%s\n' '--- overlay kustomizations ---'
for file in hack/manifests/log-generator/overlays/by_payload_size/1024b_0001lps/kustomization.yaml \
hack/manifests/log-generator/overlays/logtype/application/kustomization.yaml; do
printf '%s\n' "--- $file ---"
cat -n "$file"
doneRepository: openshift/cluster-logging-operator Length of output: 2609 Add a selector for the log-generator pods. This Service has no 🤖 Prompt for AI Agents |
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| apiVersion: monitoring.coreos.com/v1 | ||
| kind: ServiceMonitor | ||
| metadata: | ||
| name: log-generator | ||
| spec: | ||
| selector: | ||
| app.kubernetes.io/name: log-generator | ||
| app.kubernetes.io/component: log-generator | ||
| app.kubernetes.io/part-of: cluster-logging | ||
|
jcantrill marked this conversation as resolved.
|
||
| endpoints: | ||
| - port: metrics | ||
| jobLabel: monitor-log-generator | ||
| podTargetLabels: | ||
| - app.kubernetes.io/name | ||
| - app.kubernetes.io/component | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| apiVersion: kustomize.config.k8s.io/v1beta1 | ||
| kind: Kustomization | ||
| resources: | ||
| - ../../../base | ||
|
|
||
| patches: | ||
| - patch: |- | ||
| - op: replace | ||
| path: /spec/template/spec/containers/0/env | ||
| value: | ||
| - name: LOGS_PER_SECOND | ||
| value: "1" | ||
| - name: PAYLOAD_SIZE | ||
| value: "1024" | ||
| target: | ||
| kind: Deployment |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| apiVersion: kustomize.config.k8s.io/v1beta1 | ||
| kind: Kustomization | ||
| resources: | ||
| - ../../../base | ||
|
|
||
| patches: | ||
| - patch: |- | ||
| - op: replace | ||
| path: /spec/template/spec/containers/0/args | ||
| value: | ||
| - --logs-per-second=$(LOGS_PER_SECOND) | ||
| - --log-type=application | ||
| - --log-format=raw | ||
| target: | ||
| kind: Deployment |
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,7 @@ | ||
| apiVersion: kustomize.config.k8s.io/v1beta1 | ||
| kind: Kustomization | ||
| namespace: openshift-logging-storage | ||
| namespace: openshift-logging | ||
| resources: | ||
| - namespace.yaml | ||
| - loki_stack.yaml | ||
| - operator_group.yaml | ||
| - subscription.yaml |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| apiVersion: operators.coreos.com/v1 | ||
| kind: OperatorGroup | ||
| metadata: | ||
| name: cluster-logging-operator | ||
| namespace: openshift-logging | ||
| spec: | ||
| targetNamespaces: [] |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| apiVersion: operators.coreos.com/v1alpha1 | ||
| kind: Subscription | ||
| metadata: | ||
| name: cluster-logging-operator | ||
| namespace: openshift-logging | ||
| spec: | ||
| channel: stable-6.2 | ||
| name: cluster-logging | ||
| source: redhat-operators | ||
| sourceNamespace: openshift-marketplace |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| apiVersion: kustomize.config.k8s.io/v1beta1 | ||
| kind: Kustomization | ||
| namespace: openshift-cluster-observability-operator | ||
| resources: | ||
| - namespace.yaml | ||
| - operator_group.yaml | ||
| - subscription.yaml |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| apiVersion: v1 | ||
| kind: Namespace | ||
| metadata: | ||
| labels: | ||
| kubernetes.io/metadata.name: openshift-cluster-observability-operator | ||
| openshift.io/cluster-monitoring: "true" | ||
| pod-security.kubernetes.io/audit: privileged | ||
| pod-security.kubernetes.io/enforce: privileged | ||
| pod-security.kubernetes.io/warn: privileged | ||
| security.openshift.io/scc.podSecurityLabelSync: "false" | ||
| name: openshift-cluster-observability-operator | ||
| spec: | ||
| finalizers: | ||
| - kubernetes |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| apiVersion: operators.coreos.com/v1 | ||
| kind: OperatorGroup | ||
| metadata: | ||
| name: cluster-observability-operator | ||
| spec: | ||
| targetNamespaces: [] |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| apiVersion: operators.coreos.com/v1alpha1 | ||
| kind: Subscription | ||
| metadata: | ||
| name: cluster-observability-operator | ||
| spec: | ||
| channel: stable | ||
| name: cluster-observability-operator | ||
| source: redhat-operators | ||
| sourceNamespace: openshift-marketplace |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,21 @@ | ||||||
| # Garage S3 Storage for Loki Operator | ||||||
|
|
||||||
| Deploys [Garage](https://garagehq.deuxfleurs.fr/) as an S3-compatible object storage backend for testing the Loki Operator on OpenShift. | ||||||
|
|
||||||
| Uses Garage's `--single-node` and `--default-bucket` flags to automatically configure the cluster layout, create a `loki` bucket, and provision access keys on first startup — no manual setup required. | ||||||
|
|
||||||
| Furthermore, a secret named `test` will be deployed to allow easy integration with the LokiStack manifests we have upstream | ||||||
|
|
||||||
| ## Deploy | ||||||
|
|
||||||
| ```bash | ||||||
| oc apply -k manifests/garage/ | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win Fix the deployment path.
Proposed fix-oc apply -k manifests/garage/
+oc apply -k hack/manifests/observability-operators/garage/📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||
| oc wait pod --for=condition=Ready -n openshift-logging -l app.kubernetes.io/name=garage --timeout=120s | ||||||
| ``` | ||||||
|
|
||||||
| ## Verify | ||||||
|
|
||||||
| ```bash | ||||||
| oc exec -n openshift-logging garage-0 -- /garage bucket list | ||||||
| oc exec -n openshift-logging garage-0 -- /garage key list | ||||||
| ``` | ||||||
Uh oh!
There was an error while loading. Please reload this page.