Dhruva Upamanyu
Dhruva Upamanyu

Reputation: 1

How do i get the canary and stable image tags of a container which uses argo rollouts but references deployment

My argo rollouts are defined as

apiVersion: argoproj.io/v1alpha1               # Create a rollout resource
kind: Rollout
metadata:
  name: rollout-ref-deployment
spec:
  replicas: 5
  selector:
    matchLabels:
      app: rollout-ref-deployment
  workloadRef:                                 # Reference an existing Deployment using workloadRef field
    apiVersion: apps/v1
    kind: Deployment
    name: rollout-ref-deployment
    scaleDown: onsuccess
  strategy:
    canary:
      steps:
        - setWeight: 20
        - pause: {duration: 10s}
---
apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app.kubernetes.io/instance: rollout-canary
  name: rollout-ref-deployment
spec:
  replicas: 0                                  # Scale down existing deployment
  selector:
    matchLabels:
      app: rollout-ref-deployment
  template:
    metadata:
      labels:
        app: rollout-ref-deployment
    spec:
      containers:
        - name: rollouts-demo
          image: argoproj/rollouts-demo:blue
          imagePullPolicy: Always
          ports:
            - containerPort: 8080

I use argo rollouts to reference a deployment and i want to use argo rollouts notification to get the image spec of the deployment. However as per the docs i have access to .rollout.spec.template.spec.containers as mentioned here

Any way i can get the image tag of the deployment in this setup?

I tried using .deployment.spec.template.spec.containers but that doesnt work

Upvotes: 0

Views: 16

Answers (0)

Related Questions