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

allow modify labels/annotations of copied resources #546

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

profiprog
Copy link

This is solution for issues #509 and #465
Is adding new annotations kubed.appscode.com/sync-labels and kubed.appscode.com/sync-annotations
which can be added to source resource...

...
  annotations:
    kubed.appscode.com/sync: copy-this-resource=true

    # label `app.kubernetes.io/instance` will be removed in target resource because doesn't specify any value
    # label  `managed-by` will be created or replaced in target resource by value 'author'
    kubed.appscode.com/sync-labels: |
      app.kubernetes.io/instance
      managed-by=author

    # same logic but applied for target annotations
    kubed.appscode.com/sync-annotations:
...

@mac-abdon
Copy link

mac-abdon commented Mar 8, 2023

@profiprog Bump on this PR. This feature would be really useful if you're using a central config-syncer to push secrets/configmaps to remote cluster and then using config-syncer to synchronize resources to specific namespaces. Either this, or build support for config-syncer to push secrets/configmaps to multiple namespaces on the same cluster. Currently, if you configure your kubeconfig to have multiple contexts to the same cluster, config-syncer throws an error.

- kubed.appscode.com/sync-labels
- kubed.appscode.com/sync-annotations

Signed-off-by: Milan Skuhra <milan.skuhra@profiprog.com>
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

Successfully merging this pull request may close these issues.

2 participants