system-upgrade-controller
system-upgrade-controller copied to clipboard
Support pod labels and annotations
Is your feature request related to a problem? Please describe. I need to be able to apply pod annotations for the created jobs so that my log collection framework can route the logs to the indexer.
Describe the solution you'd like
Support for setting labels and annotations on upgrade.cattle.io/v1:Plan custom resource.
The full path to spec...labels is whatever the owners would want, but it should generate the Job with the .spec.template.metadata. with the labels and annotations provided.
Example implementation:
---
apiVersion: upgrade.cattle.io/v1
kind: Plan
metadata:
name: job-name
...
spec:
metadata
labels:
my-custom-label: one
annotations:
logging.io/index: my-index
concurrency: 1
...
It would then generate job manifests similar to this:
apiVersion: batch/v1
kind: Job
metadata:
name: job-name-hostname
...
spec:
template:
metadata:
name: job-name-hostname1
labels:
my-custom-label: one
annotations:
logging.io/index: my-index
...
What if SUC took existing labels+annotations that aren't in a cattle.io "namespace" from the Plan and set them on the generated Job and Pod template? Are there use-cases where that might be problematic? :thinking:
That should be fine also.