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

How to check manifests only labels #682

Open
Minivolk02 opened this issue Dec 8, 2023 · 0 comments
Open

How to check manifests only labels #682

Minivolk02 opened this issue Dec 8, 2023 · 0 comments
Labels
question Further information is requested

Comments

@Minivolk02
Copy link

Question

Hi, I have two clusterimagepolicies

apiVersion: policy.sigstore.dev/v1alpha1
kind: ClusterImagePolicy
metadata:
name: image-policy-objectmeta
spec:
mode: warn
match:
- resource: deployments
version: v1
group: apps
selector:
matchLabels:
group: back
images:

  • glob: "nginx"
    authorities:
    • static:
      action: fail

apiVersion: policy.sigstore.dev/v1beta1
kind: ClusterImagePolicy
metadata:
name: image-policy-default
spec:
images:

  • glob: "**"
    authorities:
    • static:
      action: pass

And one deployment:
apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx-deployment
spec:
selector:
matchLabels:
app: nginx
replicas: 1
template:
metadata:
labels:
app: nginx
group: back
spec:
containers:
- name: nginx
image: nginx:1.14.2
ports:
- containerPort: 80

I want to check image only if manifest have label : group: back , and others manifests should not fail, how get it?
Now it doesnt work i dont know why please help me

@Minivolk02 Minivolk02 added the question Further information is requested label Dec 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant