From c8815db4cd26ef0fd176f6495a182ee85304dbc5 Mon Sep 17 00:00:00 2001 From: Zain Siddiqui <64101827+John2020-cyber@users.noreply.github.com> Date: Tue, 2 Jan 2024 15:04:47 +0500 Subject: [PATCH] Add regex_replace for infra (#35) * Add regex_replace for infra * Multi line scalar block * Update * update * update multiline * Fix lint --- config/manager/kustomization.yaml | 8 ++-- ...nsible-operator.clusterserviceversion.yaml | 44 +++++++++---------- .../tasks/grafana_oncall_standalone.yml | 4 +- 3 files changed, 29 insertions(+), 27 deletions(-) diff --git a/config/manager/kustomization.yaml b/config/manager/kustomization.yaml index 69c2e2da..cd7bed9c 100644 --- a/config/manager/kustomization.yaml +++ b/config/manager/kustomization.yaml @@ -1,8 +1,8 @@ resources: -- manager.yaml + - manager.yaml apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization images: -- name: controller - newName: ghcr.io/stakater/grafana-cloud-ansible-operator - newTag: v0.0.21 + - name: controller + newName: ghcr.io/stakater/grafana-cloud-ansible-operator + newTag: v0.0.21 diff --git a/config/manifests/bases/grafana-cloud-ansible-operator.clusterserviceversion.yaml b/config/manifests/bases/grafana-cloud-ansible-operator.clusterserviceversion.yaml index dc5dbbd7..3344a6e1 100644 --- a/config/manifests/bases/grafana-cloud-ansible-operator.clusterserviceversion.yaml +++ b/config/manifests/bases/grafana-cloud-ansible-operator.clusterserviceversion.yaml @@ -13,36 +13,36 @@ spec: Grafana Cloud displayName: grafana-cloud-operator icon: - - base64data: "" - mediatype: "" + - base64data: "" + mediatype: "" install: spec: deployments: null strategy: "" installModes: - - supported: true - type: OwnNamespace - - supported: true - type: SingleNamespace - - supported: false - type: MultiNamespace - - supported: false - type: AllNamespaces + - supported: true + type: OwnNamespace + - supported: true + type: SingleNamespace + - supported: false + type: MultiNamespace + - supported: false + type: AllNamespaces keywords: - - grafana-cloud - - oncall - - sre - - dashboard - - grafana-sre - - grafana-oncall - - slo - - grafana-slo + - grafana-cloud + - oncall + - sre + - dashboard + - grafana-sre + - grafana-oncall + - slo + - grafana-slo links: - - name: Grafana Cloud Ansible Operator - url: https://grafana-cloud-ansible-operator.domain + - name: Grafana Cloud Ansible Operator + url: https://grafana-cloud-ansible-operator.domain maintainers: - - email: hello@stakater.com - name: stakater + - email: hello@stakater.com + name: stakater maturity: alpha provider: name: Stakater diff --git a/roles/grafana_cloud_operator/tasks/grafana_oncall_standalone.yml b/roles/grafana_cloud_operator/tasks/grafana_oncall_standalone.yml index 75f8e9ca..863f8e73 100644 --- a/roles/grafana_cloud_operator/tasks/grafana_oncall_standalone.yml +++ b/roles/grafana_cloud_operator/tasks/grafana_oncall_standalone.yml @@ -25,7 +25,9 @@ - name: Update hostname ansible.builtin.set_fact: - cluster_name: "{{ node_info.resources[0].metadata.labels['kubernetes.io/hostname'] | regex_replace('-master.*', '') | regex_replace('-worker.*', '') }}" + cluster_name: > + "{{ node_info.resources[0].metadata.labels['kubernetes.io/hostname'] | regex_replace('-master.*', '') + | regex_replace('-worker.*', '') | regex_replace('-infra.*', '') }}" - name: Determine if integration exists for the cluster ansible.builtin.set_fact: