Uploaded image for project: 'OpenShift Cloud'
  1. OpenShift Cloud
  2. OCPCLOUD-1708

Set default container for cloud team operators

XMLWordPrintable

    • Icon: Story Story
    • Resolution: Done
    • Icon: Normal Normal
    • None
    • None
    • False
    • None
    • False
    • CLOUD Sprint 228, CLOUD Sprint 229

      User Story

      As a user it would be convenient to have the default container set on OpenShift deployments so that when I get logs from the command line it is easier to know which container I should be inspecting.

      Background

      Inspired by this comment in slack , it would make our users' lives easier if they didn't need to always specify the container name when getting logs.

      For example, this scenario is common:

       $ oc -n openshift-machine-api logs -l k8s-app=cluster-autoscaler-operator --tail 3
      Defaulted container "kube-rbac-proxy" out of: kube-rbac-proxy, cluster-autoscaler-operator
      I1011 16:26:34.230712       1 main.go:337] Reading certificate files
      I1011 16:26:34.230968       1 main.go:371] Starting TCP socket on 0.0.0.0:9192
      I1011 16:26:34.231772       1 main.go:378] Listening securely on 0.0.0.0:9192
      
      

      If the default container were set this operation would have given the logs for the cluster-autoscaler-operator instead of the kube-rbac-proxy.

      The Kuberenetes community has defined a  well-known annotation to specify the default container, `kubectl.kubernetes.io/default-container`. This should be added to the machine-api-operator, cluster-autoscaler-operator, and cluster-cloud-controller-manager-operator, as well as all the individual deployments from those repositories.

      In addition, for convenience, the first container of every deployment should be specified as the default container, eg the first container should be the important one.

      Steps

      • Update deployments in MAO, CAO, and CCCMO

      Stakeholders

      • openshift eng

      Definition of Done

      • users can get logs using the default container for the primary targets of MAO, CAO, and CCCMO
      • Docs
      • n/a
      • Testing
      • n/a

              dodvarka@redhat.com Daniel Odvarka (Inactive)
              mimccune@redhat.com Michael McCune
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: