Uploaded image for project: 'Red Hat 3scale API Management'
  1. Red Hat 3scale API Management
  2. THREESCALE-2662

Investigate Operator invalid character set in a Service

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • None
    • 2.6 ER1
    • 3scale Operator
    • None
    • Not Started
    • Not Started
    • Not Started
    • Not Started
    • Not Started
    • Not Started

      When the operator is deployed through in the cluster (not locally), the following message is observed when looking at the logs of the operator pod when the pod is started (without creating any CR nor anything else):

      {"level":"info","ts":1559141154.4200816,"logger":"cmd","msg":"failed to create or get service for metrics: Service \"3scale-operator\" is invalid: metadata.name: Invalid value: \"3scale-operator\": a DNS-1035 label must consist of lower case alphanumeric characters or '-', start with an alphabetic character, and end with an alphanumeric character (e.g. 'my-name',  or 'abc-123', regex used for validation is '[a-z]([-a-z0-9]*[a-z0-9])?')"}
      

      The full log is:

      msoriano@localhost:~/go/src/github.com/3scale/3scale-operator/deploy (master)$ oc logs 3scale-operator-556fb7699b-7nw59
      {"level":"info","ts":1559141154.250996,"logger":"cmd","msg":"Go Version: go1.11.4"}
      {"level":"info","ts":1559141154.2510405,"logger":"cmd","msg":"Go OS/Arch: linux/amd64"}
      {"level":"info","ts":1559141154.2510445,"logger":"cmd","msg":"operator-sdk Version: v0.5.0+git"}
      {"level":"info","ts":1559141154.251221,"logger":"leader","msg":"Trying to become the leader."}
      {"level":"info","ts":1559141154.3368814,"logger":"leader","msg":"No pre-existing lock was found."}
      {"level":"info","ts":1559141154.3451324,"logger":"leader","msg":"Became the leader."}
      {"level":"info","ts":1559141154.376769,"logger":"cmd","msg":"Registering Components."}
      {"level":"info","ts":1559141154.3774283,"logger":"kubebuilder.controller","msg":"Starting EventSource","controller":"apimanager-controller","source":"kind source: /, Kind="}
      {"level":"info","ts":1559141154.377607,"logger":"kubebuilder.controller","msg":"Starting EventSource","controller":"binding-controller","source":"kind source: /, Kind="}
      {"level":"info","ts":1559141154.3776643,"logger":"kubebuilder.controller","msg":"Starting EventSource","controller":"binding-controller","source":"kind source: /, Kind="}
      {"level":"info","ts":1559141154.377704,"logger":"kubebuilder.controller","msg":"Starting EventSource","controller":"binding-controller","source":"kind source: /, Kind="}
      {"level":"info","ts":1559141154.3777418,"logger":"kubebuilder.controller","msg":"Starting EventSource","controller":"binding-controller","source":"kind source: /, Kind="}
      {"level":"info","ts":1559141154.377779,"logger":"kubebuilder.controller","msg":"Starting EventSource","controller":"binding-controller","source":"kind source: /, Kind="}
      {"level":"info","ts":1559141154.3778121,"logger":"kubebuilder.controller","msg":"Starting EventSource","controller":"binding-controller","source":"kind source: /, Kind="}
      {"level":"info","ts":1559141154.3778627,"logger":"kubebuilder.controller","msg":"Starting EventSource","controller":"tenant-controller","source":"kind source: /, Kind="}
      {"level":"info","ts":1559141154.4200816,"logger":"cmd","msg":"failed to create or get service for metrics: Service \"3scale-operator\" is invalid: metadata.name: Invalid value: \"3scale-operator\": a DNS-1035 label must consist of lower case alphanumeric characters or '-', start with an alphabetic character, and end with an alphanumeric character (e.g. 'my-name',  or 'abc-123', regex used for validation is '[a-z]([-a-z0-9]*[a-z0-9])?')"}
      {"level":"info","ts":1559141154.4201422,"logger":"cmd","msg":"Starting the Cmd."}
      {"level":"info","ts":1559141154.5286808,"logger":"kubebuilder.controller","msg":"Starting Controller","controller":"tenant-controller"}
      {"level":"info","ts":1559141154.528768,"logger":"kubebuilder.controller","msg":"Starting Controller","controller":"apimanager-controller"}
      {"level":"info","ts":1559141154.5287886,"logger":"kubebuilder.controller","msg":"Starting Controller","controller":"binding-controller"}
      {"level":"info","ts":1559141154.628851,"logger":"kubebuilder.controller","msg":"Starting workers","controller":"binding-controller","worker count":1}
      {"level":"info","ts":1559141154.6289124,"logger":"kubebuilder.controller","msg":"Starting workers","controller":"tenant-controller","worker count":1}
      {"level":"info","ts":1559141154.628924,"logger":"kubebuilder.controller","msg":"Starting workers","controller":"apimanager-controller","worker count":1}
      

      Although this error is shown the operator is able to start correctly and it processes CR requests correctly apparently.

      We should review why this error happens (seems related to having the '3' in 3scale somewhere that is not compatible with it) and see if we can solve it/we need to change anything

              tjochec@redhat.com Tomas Jochec
              msorianod Miguel Soriano
              Miroslav Jaroš Miroslav Jaroš (Inactive)
              Miguel Soriano Miguel Soriano
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: