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

Replacing namespace in Prometheus operator bundle file produces invalid YAML

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Done
    • None
    • 1.7.0.GA
    • None
    • None

    Description

      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
      
      

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: