Skip to content

unknown field "namespace" in io.argoproj.v1alpha1.Rollout.spec.template.metadata #31

@sridhar-parvathala

Description

@sridhar-parvathala

Hello,

I am trying to deploy a below Rollout resource and got the following error. I have made some change in the original rollout.yaml by adding namespace field under pod spec template metadata which is working fine if the Kind is Deployment but the same is failing if the Kind is Rollout

https://raw.githubusercontent.com/argoproj/argo-rollouts/master/docs/getting-started/basic/rollout.yaml

error: error validating "rollout.yaml": error validating data: ValidationError(Rollout.spec.template.metadata): unknown field "namespace" in io.argoproj.v1alpha1.Rollout.spec.template.metadata; if you choose to ignore these errors, turn validation off with --validate=false

I am copying the modified Rollout yaml for your reference ,Please note the namespace field is added in two places which is supported if the Kind is Deployment

apiVersion: argoproj.io/v1alpha1
kind: Rollout
metadata:
  name: rollouts-demo
  namespace: rollout
spec:
  replicas: 5
  strategy:
    canary:
      steps:
      - setWeight: 20
      - pause: {}
      - setWeight: 40
      - pause: {duration: 10}
      - setWeight: 60
      - pause: {duration: 10}
      - setWeight: 80
      - pause: {duration: 10}
  revisionHistoryLimit: 2
  selector:
    matchLabels:
      app: rollouts-demo
  template:
    metadata:
      labels:
        app: rollouts-demo
        namespace: rollout
    spec:
      containers:
      - name: rollouts-demo
        image: argoproj/rollouts-demo:blue
        ports:
        - name: http
          containerPort: 8080
          protocol: TCP
        resources:
          requests:
            memory: 32Mi
            cpu: 5m

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