Uploaded image for project: 'AMQ Streams'
  1. AMQ Streams
  2. ENTMQST-2472

Replacing namespace in Prometheus operator bundle file produces invalid YAML

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 1.7.0.GA
    • None
    • None
    • None

      In our documentation, we are suggesting to use the command

      curl -s https://raw.githubusercontent.com/coreos/prometheus-operator/master/bundle.yaml | sed -e 's/namespace: .*/namespace: my-namespace/' > prometheus-operator-deployment.yaml
      

      to adjust Prometheus operator namespace.
      Unfortunately, in some versions (master), there is a matching expression in the comment (see https://github.com/prometheus-operator/prometheus-operator/blob/master/bundle.yaml#L1812)
      This command removes the closing comment char and an invalid YAML file is produced.

       

      Possible solution (not sure about namespace expression):

      curl -s https://raw.githubusercontent.com/coreos/prometheus-operator/master/bundle.yaml | sed -e 's/namespace: [-a-zA-Z0-9]*$/namespace: my-namespace/' > prometheus-operator-deployment.yaml
      
      

              sknot@redhat.com Stanislav Knot (Inactive)
              sknot@redhat.com Stanislav Knot (Inactive)
              Lukas Kral Lukas Kral
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: