Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
sridhar-parvathala opened this issue Mar 15, 2023 · 0 comments

Comments

@sridhar-parvathala
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant