open-policy-agent / gatekeeper

🐊 Gatekeeper - Policy Controller for Kubernetes
https://open-policy-agent.github.io/gatekeeper/
Apache License 2.0
3.7k stars 759 forks source link

Allow syncing all possible resource versions #1664

Open FooBarWidget opened 3 years ago

FooBarWidget commented 3 years ago

Describe the solution you'd like The replicating data feature requires explicitly specifying resource versions. I'd like to be able to sync all versions of a resource, without having to specify explicit versions. This way, when I upgrade my Kubernetes clusters (which may introduce new resource versions), I don't have to update my Gatekeeper config to include new resource versions.

apiVersion: config.gatekeeper.sh/v1alpha1
kind: Config
metadata:
  name: config
  namespace: gatekeeper-system
spec:
  sync:
    syncOnly:
      - group: networking.k8s.io
        kind: Ingress
        version: v1   # <--- please make this optional, or allow "*"
      - group: extensions
        kind: Ingress
        version: v1beta1

Environment:

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. Thank you for your contributions.

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. Thank you for your contributions.

ctml91 commented 2 years ago

/reopen

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. Thank you for your contributions.

ctml91 commented 1 year ago

active

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. Thank you for your contributions.

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. Thank you for your contributions.

ritazh commented 1 year ago

@anlandu @julianKatz please make sure the SyncSet design addresses this issue.

julianKatz commented 1 year ago

Hey @FooBarWidget!

Thanks for this feedback. We're designing a feature that involves referential data sync configuration (like the Config resource's spec.sync.syncOnly field you mention), and wanted to check in with you on the friction you documented in this issue.

In particular, you mention how you are interested in having sync config that is durable across upgrades. I.e., if a version of a given GroupKind is added or removed, you'd prefer not to take the additional manual step of updating the Config. The wildcard (*) is solely a way of achieving that outcome.

Does that accurately portray your viewpoint?