Inconsistent setup for application deletion

#1

I did manage to deploy an application with Spinnaker applying the following manifest:

apiVersion: v1
kind: Service
metadata:
  name: catalog
  namespace: stage
spec:
  ports:
    - port: 80
      targetPort: 8080
  selector:
    app: catalog
  type: NodePort
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: catalog
  namespace: stage
spec:
  replicas: 3
  selector:
    matchLabels:
      app: catalog
  template:
    metadata:
      labels:
        app: catalog
    spec:
      containers:
        - image: gcr.io/my-proj/catalog
          imagePullPolicy: Always
          name: catalog
          ports:
            - containerPort: 8080
---
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: catalog
  namespace: stage
spec:
  backend:
    serviceName: catalog
    servicePort: 80
`

Everything works fine until this point.
However, as next stage, I’d like to delete all services, deployments and ingresses within the stage namespace.

For this purpose, I did try to setup a Delete (Manifest) stage, defining the targeted namespace and using names/values to map:


  • deployment : catalog
  • ingress : catalog
  • service: catalog

However, even saving the stage configuration, Spinnaker does not retain the namespace information:

07

Could you help me in figuring out the issue? Is it a bug?
Thanks, SZ

0 Likes

#2

@subzeno: Spinnaker doesn’t propagate namespace information between stages, so you’ll need to explicitly specify the namespace in the following stage. (It’s possible, for example, to deploy manifests to multiple namespaces in a single Deploy operation—and even to deploy something with the same name to multiple namespaces, in which case it might not be clear which one the delete stage should refer to.)

0 Likes

#3

In my case, Spinnaker does not save the namespace information even after explicitly provided.

First:

Right after (even if saved), the namespace field appears empty.

Is it as expected?

0 Likes

#4

Any update about this issue?

Thanks, Cheers, SZ

0 Likes