Skip to content

Conversation

@imightbuyaboat
Copy link

Feature: Add --exclude-annotations Flag

Summary

This pull request introduces a new command-line flag --exclude-annotations. This feature allows users to specify a comma-separated list of annotations that, when present on a resource, will exclude it from the replication process of ConfigMaps, Roles, RoleBindings, Secrets and ServiceAccounts.

Implementation Details

  • Added ExcludeAnnotations field to the configuration structure
  • Implemented logic in replicate/common/annotations_exclude.go to handle annotation-based exclusion
  • Integrated exclusion logic into GenericReplicator
  • Fixed unit tests

Usage Example

kubernetes-replicator --exclude-annotations=skip-replication,temporary

Benefits

This enhancement provides greater control over the replication process, allowing administrators to prevent replication of specific resources by marking them with designated annotations, which is particularly useful for maintaining security and avoiding conflicts with resources that should remain namespace-local or temporary.

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.

1 participant