cdk8s-team / cdk8s

Define Kubernetes native apps and abstractions using object-oriented programming
https://cdk8s.io
Apache License 2.0
4.31k stars 291 forks source link

Unable to create a custom ApiResource with a resource name #2187

Open iliapolo opened 1 year ago

iliapolo commented 1 year ago

It should be possible to do the following:

const role = new kplus.Role(this, 'Role');

// custom ApiResource that references a specific resource
role.allowGet(kplus.ApiResource.custom({
  apiGroup: '',
  resourceType: 'configmaps',
  resourceNames: ['ingress-controller-leader']
}));
diranged commented 1 year ago

I just ran into this too ... I was quite surprised that we can't do this...

nicolai0 commented 5 months ago

👍 for this, it's pretty important