Skip to content

Commit

Permalink
add kyverno-policy-operator-0.0.7-2b74cbf8a6e4ba50475c719d3fbf5566e06…
Browse files Browse the repository at this point in the history
…b992a.tgz

kyverno-policy-operator-0.0.7-2b74cbf8a6e4ba50475c719d3fbf5566e06b992a.tgz-meta/README.md
kyverno-policy-operator-0.0.7-2b74cbf8a6e4ba50475c719d3fbf5566e06b992a.tgz-meta/main.yaml
kyverno-policy-operator-0.0.7-2b74cbf8a6e4ba50475c719d3fbf5566e06b992a.tgz-meta/values.schema.json
  • Loading branch information
catalogbot committed Jan 16, 2025
1 parent b759c57 commit 07901d9
Show file tree
Hide file tree
Showing 5 changed files with 374 additions and 1 deletion.
19 changes: 18 additions & 1 deletion index.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12114,6 +12114,23 @@ entries:
urls:
- https://giantswarm.github.io/giantswarm-test-catalog/kyverno-policy-operator-0.0.7-2f31d2128126a625fd41f71dac342158eb4ef39a.tgz
version: 0.0.7-2f31d2128126a625fd41f71dac342158eb4ef39a
- annotations:
application.giantswarm.io/metadata: https://giantswarm.github.io/giantswarm-test-catalog/kyverno-policy-operator-0.0.7-2b74cbf8a6e4ba50475c719d3fbf5566e06b992a.tgz-meta/main.yaml
application.giantswarm.io/readme: https://giantswarm.github.io/giantswarm-test-catalog/kyverno-policy-operator-0.0.7-2b74cbf8a6e4ba50475c719d3fbf5566e06b992a.tgz-meta/README.md
application.giantswarm.io/team: shield
application.giantswarm.io/values-schema: https://giantswarm.github.io/giantswarm-test-catalog/kyverno-policy-operator-0.0.7-2b74cbf8a6e4ba50475c719d3fbf5566e06b992a.tgz-meta/values.schema.json
apiVersion: v2
appVersion: 0.0.1
created: "2025-01-16T07:03:30.979415244Z"
description: A Helm chart for kyverno-policy-operator, which creates PolicyExceptions
based on PolicyExceptionsDraft resources.
digest: 29317d4b8b337e164404f48a88a3c38ec8422d238cc96926dabff53594137faf
home: https://github.com/giantswarm/kyverno-policy-operator
icon: https://s.giantswarm.io/app-icons/giantswarm/1/light.svg
name: kyverno-policy-operator
urls:
- https://giantswarm.github.io/giantswarm-test-catalog/kyverno-policy-operator-0.0.7-2b74cbf8a6e4ba50475c719d3fbf5566e06b992a.tgz
version: 0.0.7-2b74cbf8a6e4ba50475c719d3fbf5566e06b992a
- annotations:
application.giantswarm.io/metadata: https://giantswarm.github.io/giantswarm-test-catalog/kyverno-policy-operator-0.0.7-276ddfa011e531237f7997334b8ca1305b95956b.tgz-meta/main.yaml
application.giantswarm.io/readme: https://giantswarm.github.io/giantswarm-test-catalog/kyverno-policy-operator-0.0.7-276ddfa011e531237f7997334b8ca1305b95956b.tgz-meta/README.md
Expand Down Expand Up @@ -16567,4 +16584,4 @@ entries:
urls:
- https://giantswarm.github.io/giantswarm-test-catalog/zot-2.0.1-0e14abfd878d83639c1853526778e188e9110c5d.tgz
version: 2.0.1-0e14abfd878d83639c1853526778e188e9110c5d
generated: "2025-01-16T06:48:07.76238803Z"
generated: "2025-01-16T07:03:30.978575119Z"
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
[![CircleCI](https://dl.circleci.com/status-badge/img/gh/giantswarm/kyverno-policy-operator/tree/main.svg?style=svg)](https://dl.circleci.com/status-badge/redirect/gh/giantswarm/kyverno-policy-operator/tree/main)

# kyverno-policy-operator chart

Giant Swarm offers a kyverno-policy-operator App which can be installed in workload clusters.
Here we define the kyverno-policy-operator chart with its templates and default configuration.

Kyverno Policy Operator reconciles the Giant Swarm PolicyException instances and creates the necessary Kyverno PolicyExceptions objects.

A Giant Swarm PolicyException consists of a list of Policies and Targets to be excluded from the Kyverno Policy Engine. Having a Giant Swarm PolicyException will ensure that workloads targeted by that policy won't be blocked during Admission time by Kyverno.

### Sample Giant Swarm PolicyException:

In some cases, it may be necessary to exempt specific resources from the enforcement of Kyverno policies, such as `disallow-privilege-escalation` and `require-run-as-nonroot`. To achieve this, you can create a Giant Swarm PolicyException. Below is an example of how to exclude the `my-custom-operator` Deployment in the `default` namespace from these policies:

```yaml
apiVersion: policy.giantswarm.io/v1alpha1
kind: PolicyException
metadata:
name: my-custom-operator
namespace: policy-exceptions
spec:
policies:
- disallow-privilege-escalation
- require-run-as-nonroot
targets:
- kind: Deployment
names:
- my-custom-operator
namespaces:
- default
```
This Policy Exception configuration will be detected by the Kyverno Policy Operator, which will create a corresponding Kyverno Policy Exception resource:
```yaml
apiVersion: kyverno.io/v2beta1
kind: PolicyException
metadata:
labels:
app.kubernetes.io/managed-by: kyverno-policy-operator
name: my-custom-operator
namespace: policy-exceptions
(...)
spec:
background: false
exceptions:
- policyName: require-run-as-nonroot
ruleNames:
- run-as-non-root
- autogen-run-as-non-root
- autogen-cronjob-run-as-non-root
- policyName: disallow-privilege-escalation
ruleNames:
- privilege-escalation
- autogen-privilege-escalation
- autogen-cronjob-privilege-escalation
match:
any:
- resources:
kinds:
- Deployment
- ReplicaSet
- Pod
names:
- my-custom-operator*
namespaces:
- default
```
## Installing
There are several ways to install this app onto a workload cluster.
- [Using GitOps to instantiate the App](https://docs.giantswarm.io/advanced/gitops/apps/)
- [Using our web interface](https://docs.giantswarm.io/platform-overview/web-interface/app-platform/#installing-an-app).
- By creating an [App resource](https://docs.giantswarm.io/use-the-api/management-api/crd/apps.application.giantswarm.io/) in the management cluster as explained in [Getting started with App Platform](https://docs.giantswarm.io/getting-started/app-platform/).
## Configuring
### values.yaml
**This is an example of a values file you could upload using our web interface.**
```yaml
# Set the PolicyExceptions destination namespace
policyOperator:
destinationNamespace: ""
```
### Sample App CR and ConfigMap for the management cluster
If you have access to the Kubernetes API on the management cluster, you could create
the App CR and ConfigMap directly.
Here is an example that would install the app to
workload cluster `abc12`:

```yaml
# appCR.yaml
apiVersion: application.giantswarm.io/v1alpha1
kind: App
metadata:
name: kyverno-policy-operator
namespace: demo01
spec:
catalog: giantswarm-playground-test
config:
configMap:
name: demo01-cluster-values
namespace: demo01
name: kyverno-policy-operator
namespace: kyverno-policy-operator
version: 0.0.1
```

```yaml
# user-values-configmap.yaml
policyOperator:
destinationNamespace: "policy-exceptions"
```

See our [full reference on how to configure apps](https://docs.giantswarm.io/getting-started/app-platform/app-configuration/) for more details.

## Compatibility

This app has been tested to work with the following workload cluster release versions:

- v19.1.0

## Limitations

This App needs Kyverno App [v0.15+](https://github.com/giantswarm/kyverno-app) to be installed in the cluster.
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
annotations:
application.giantswarm.io/metadata: https://giantswarm.github.io/giantswarm-test-catalog/kyverno-policy-operator-0.0.7-2b74cbf8a6e4ba50475c719d3fbf5566e06b992a.tgz-meta/main.yaml
application.giantswarm.io/readme: https://giantswarm.github.io/giantswarm-test-catalog/kyverno-policy-operator-0.0.7-2b74cbf8a6e4ba50475c719d3fbf5566e06b992a.tgz-meta/README.md
application.giantswarm.io/team: shield
application.giantswarm.io/values-schema: https://giantswarm.github.io/giantswarm-test-catalog/kyverno-policy-operator-0.0.7-2b74cbf8a6e4ba50475c719d3fbf5566e06b992a.tgz-meta/values.schema.json
chartApiVersion: v2
chartFile: kyverno-policy-operator-0.0.7-2b74cbf8a6e4ba50475c719d3fbf5566e06b992a.tgz
dateCreated: '2025-01-16T07:03:25.697130Z'
digest: 29317d4b8b337e164404f48a88a3c38ec8422d238cc96926dabff53594137faf
home: https://github.com/giantswarm/kyverno-policy-operator
icon: https://s.giantswarm.io/app-icons/giantswarm/1/light.svg
Original file line number Diff line number Diff line change
@@ -0,0 +1,212 @@
{
"$schema": "http://json-schema.org/schema#",
"type": "object",
"properties": {
"ciliumNetworkPolicy": {
"type": "object",
"properties": {
"enabled": {
"type": "boolean"
}
}
},
"containerSecurityContext": {
"type": "object",
"properties": {
"allowPrivilegeEscalation": {
"type": "boolean"
},
"capabilities": {
"type": "object",
"properties": {
"drop": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"privileged": {
"type": "boolean"
},
"readOnlyRootFilesystem": {
"type": "boolean"
},
"runAsNonRoot": {
"type": "boolean"
},
"seccompProfile": {
"type": "object",
"properties": {
"type": {
"type": "string"
}
}
}
}
},
"crds": {
"type": "object",
"properties": {
"image": {
"type": "object",
"properties": {
"tag": {
"type": "string"
}
}
},
"install": {
"type": "boolean"
},
"resources": {
"type": "object",
"properties": {
"limits": {
"type": "object",
"properties": {
"cpu": {
"type": "string"
},
"memory": {
"type": "string"
}
}
},
"requests": {
"type": "object",
"properties": {
"cpu": {
"type": "string"
},
"memory": {
"type": "string"
}
}
}
}
}
}
},
"global": {
"type": "object",
"properties": {
"image": {
"type": "object",
"properties": {
"registry": {
"type": "string"
}
}
},
"podSecurityStandards": {
"type": "object",
"properties": {
"enforced": {
"type": "boolean"
}
}
}
}
},
"image": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"pullPolicy": {
"type": "string"
},
"registry": {
"type": "string"
}
}
},
"name": {
"type": "string"
},
"nodeSelector": {
"type": "object"
},
"podLabels": {
"type": "object"
},
"podSecurityContext": {
"type": "object",
"properties": {
"readOnlyRootFilesystem": {
"type": "boolean"
},
"runAsGroup": {
"type": "integer"
},
"runAsNonRoot": {
"type": "boolean"
},
"runAsUser": {
"type": "integer"
},
"seccompProfile": {
"type": "object",
"properties": {
"type": {
"type": "string"
}
}
}
}
},
"policyOperator": {
"type": "object",
"properties": {
"chartOperatorExceptionKinds": {
"type": "array",
"items": {
"type": "string"
}
},
"destinationNamespace": {
"type": "string"
},
"exceptionBackgroundMode": {
"type": "boolean"
}
}
},
"resources": {
"type": "object",
"properties": {
"limits": {
"type": "object",
"properties": {
"cpu": {
"type": "string"
},
"memory": {
"type": "string"
}
}
},
"requests": {
"type": "object",
"properties": {
"cpu": {
"type": "string"
},
"memory": {
"type": "string"
}
}
}
}
},
"serviceType": {
"type": "string"
},
"tolerations": {
"type": "array"
}
}
}

0 comments on commit 07901d9

Please sign in to comment.