-
Notifications
You must be signed in to change notification settings - Fork 743
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(mutation/helm) - Add mutation to helm chart (#1220)
Signed-off-by: Rita Zhang <rita.z.zhang@gmail.com>
- Loading branch information
Showing
14 changed files
with
427 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Adds namespace to all resources. | ||
namespace: gatekeeper-system | ||
|
||
resources: | ||
- ../mutation_webhook | ||
|
||
patchesStrategicMerge: | ||
- manager_image_patch.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ | |
namespace: gatekeeper-system | ||
|
||
bases: | ||
- ../dev | ||
- ../../default | ||
|
||
resources: | ||
- webhook.yaml | ||
|
185 changes: 185 additions & 0 deletions
185
manifest_staging/charts/gatekeeper/crds/assign-customresourcedefinition.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,185 @@ | ||
apiVersion: apiextensions.k8s.io/v1beta1 | ||
kind: CustomResourceDefinition | ||
metadata: | ||
annotations: | ||
controller-gen.kubebuilder.io/version: v0.3.0 | ||
helm.sh/hook: crd-install | ||
helm.sh/hook-delete-policy: before-hook-creation | ||
labels: | ||
gatekeeper.sh/system: "yes" | ||
name: assign.mutations.gatekeeper.sh | ||
spec: | ||
group: mutations.gatekeeper.sh | ||
names: | ||
kind: Assign | ||
listKind: AssignList | ||
plural: assign | ||
singular: assign | ||
scope: Cluster | ||
validation: | ||
openAPIV3Schema: | ||
description: Assign is the Schema for the assign API | ||
properties: | ||
apiVersion: | ||
description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' | ||
type: string | ||
kind: | ||
description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' | ||
type: string | ||
metadata: | ||
type: object | ||
spec: | ||
description: AssignSpec defines the desired state of Assign | ||
properties: | ||
applyTo: | ||
description: 'INSERT ADDITIONAL SPEC FIELDS - desired state of cluster Important: Run "make" to regenerate code after modifying this file' | ||
items: | ||
description: ApplyTo determines what GVKs items the mutation should apply to. Globs are not allowed. | ||
properties: | ||
groups: | ||
items: | ||
type: string | ||
type: array | ||
kinds: | ||
items: | ||
type: string | ||
type: array | ||
versions: | ||
items: | ||
type: string | ||
type: array | ||
type: object | ||
type: array | ||
location: | ||
type: string | ||
match: | ||
properties: | ||
excludedNamespaces: | ||
items: | ||
type: string | ||
type: array | ||
kinds: | ||
items: | ||
description: Kinds accepts a list of objects with apiGroups and kinds fields that list the groups/kinds of objects to which the mutation will apply. If multiple groups/kinds objects are specified, only one match is needed for the resource to be in scope. | ||
properties: | ||
apiGroups: | ||
description: APIGroups is the API groups the resources belong to. '*' is all groups. If '*' is present, the length of the slice must be one. Required. | ||
items: | ||
type: string | ||
type: array | ||
kinds: | ||
items: | ||
type: string | ||
type: array | ||
type: object | ||
type: array | ||
labelSelector: | ||
description: A label selector is a label query over a set of resources. The result of matchLabels and matchExpressions are ANDed. An empty label selector matches all objects. A null label selector matches no objects. | ||
properties: | ||
matchExpressions: | ||
description: matchExpressions is a list of label selector requirements. The requirements are ANDed. | ||
items: | ||
description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. | ||
properties: | ||
key: | ||
description: key is the label key that the selector applies to. | ||
type: string | ||
operator: | ||
description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. | ||
type: string | ||
values: | ||
description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. | ||
items: | ||
type: string | ||
type: array | ||
required: | ||
- key | ||
- operator | ||
type: object | ||
type: array | ||
matchLabels: | ||
additionalProperties: | ||
type: string | ||
description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. | ||
type: object | ||
type: object | ||
namespaceSelector: | ||
description: A label selector is a label query over a set of resources. The result of matchLabels and matchExpressions are ANDed. An empty label selector matches all objects. A null label selector matches no objects. | ||
properties: | ||
matchExpressions: | ||
description: matchExpressions is a list of label selector requirements. The requirements are ANDed. | ||
items: | ||
description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. | ||
properties: | ||
key: | ||
description: key is the label key that the selector applies to. | ||
type: string | ||
operator: | ||
description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. | ||
type: string | ||
values: | ||
description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. | ||
items: | ||
type: string | ||
type: array | ||
required: | ||
- key | ||
- operator | ||
type: object | ||
type: array | ||
matchLabels: | ||
additionalProperties: | ||
type: string | ||
description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. | ||
type: object | ||
type: object | ||
namespaces: | ||
items: | ||
type: string | ||
type: array | ||
scope: | ||
description: ResourceScope is an enum defining the different scopes available to a custom resource | ||
type: string | ||
required: | ||
- scope | ||
type: object | ||
parameters: | ||
properties: | ||
assign: | ||
description: Assign.value holds the value to be assigned | ||
type: object | ||
x-kubernetes-preserve-unknown-fields: true | ||
ifIn: | ||
description: IfIn Only mutate if the current value is in the supplied list | ||
items: | ||
type: string | ||
type: array | ||
ifNotIn: | ||
description: IfNotIn Only mutate if the current value is NOT in the supplied list | ||
items: | ||
type: string | ||
type: array | ||
pathTests: | ||
items: | ||
description: "PathTests allows the user to customize how the mutation works if parent paths are missing. It traverses the list in order. All sub paths are tested against the provided condition, if the test fails, the mutation is not applied. All `subPath` entries must be a prefix of `location`. Any glob characters will take on the same value as was used to expand the matching glob in `location`. \n Available Tests: * MustExist - the path must exist or do not mutate * MustNotExist - the path must not exist or do not mutate" | ||
properties: | ||
condition: | ||
enum: | ||
- MustExist | ||
- MustNotExist | ||
type: string | ||
subPath: | ||
type: string | ||
type: object | ||
type: array | ||
type: object | ||
type: object | ||
status: | ||
description: AssignStatus defines the observed state of Assign | ||
type: object | ||
type: object | ||
version: v1alpha1 | ||
versions: | ||
- name: v1alpha1 | ||
served: true | ||
storage: true |
Oops, something went wrong.