Skip to content

Problem with priorityClassName on NSQ #31

Description

@FredPraca

When rendering the nsqadmin-deployment for a 1.34.8 kubernetes cluster, the following is created:

{
  "apiVersion": "apps/v1",
  "kind": "Deployment",
  "metadata": {
    "name": "nsqadmin-bug-nsqadmin",
    "labels": {
      "helm.sh/chart": "nsq-1.3.0",
      "helm.sh/release": "nsqadmin-bug",
      "app.kubernetes.io/name": "nsq",
      "app.kubernetes.io/instance": "nsqadmin-bug",
      "app.kubernetes.io/managed-by": "Helm"
    }
  },
  "spec": {
    "replicas": 1,
    "selector": {
      "matchLabels": {
        "app.kubernetes.io/component": "nsqadmin"
      }
    },
    "priorityClassName": null,
    "template": {
      "metadata": {
        "labels": {
          "app.kubernetes.io/component": "nsqadmin"
        }
      },
      "spec": {
        "securityContext": {},
        "containers": [
          {
            "name": "nsqadmin-bug-nsqadmin",
            "image": "nsqio/nsq:v1.3.0",
            "imagePullPolicy": "IfNotPresent",
            "command": [
              "/nsqadmin"
            ],
            "args": [
              "--lookupd-http-address=nsqadmin-bug-nsqlookupd-0.nsqadmin-bug-nsqlookupd:4161",
              "--lookupd-http-address=nsqadmin-bug-nsqlookupd-1.nsqadmin-bug-nsqlookupd:4161",
              "--lookupd-http-address=nsqadmin-bug-nsqlookupd-2.nsqadmin-bug-nsqlookupd:4161"
            ],
            "terminationMessagePolicy": "FallbackToLogsOnError",
            "ports": [
              {
                "containerPort": 4171,
                "name": "http"
              }
            ],
            "livenessProbe": {
              "httpGet": {
                "path": "/",
                "port": "http"
              }
            },
            "readinessProbe": {
              "httpGet": {
                "path": "/",
                "port": "http"
              }
            },
            "resources": {}
          }
        ],
        "serviceAccountName": null
      }
    }
  }
}

The problem is that Deployment.spec.priorityClassName does not exist anymore and now resides in Deployment.spec.template.spec.priorityClassName as shown in the API documentation for Deployment and for PodSpec used in PodTemplateSpec.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions