kubernetes-retired / cluster-api-provider-nested

Cluster API Provider for Nested Clusters
Apache License 2.0
301 stars 67 forks source link

Support exposing single annotations/labels via env downward API #297

Closed wondywang closed 2 years ago

wondywang commented 2 years ago

User Story

As a developer, I would like VirtualCluster to support exposing annotations/labels via env downward API.

Detailed Description For example:

containers:
  - env:
    - name: LABEL_KEY
      valueFrom:
        fieldRef:
          apiVersion: v1
          fieldPath: metadata.labels['label1']
    - name: ANNO_KEY
      valueFrom:
        fieldRef:
          apiVersion: v1
          fieldPath: metadata.annotations['anno1']

The fieldRef used for that will sync to the super cluster.

Anything else you would like to add:

More information about this issue: #31218

/kind feature