Skip to content

Commit

Permalink
Merge pull request #1694 from sratslla/i1693
Browse files Browse the repository at this point in the history
fix:Update Controller Makefile to include Helm CRD and update CRDs
  • Loading branch information
DelusionalOptimist authored Mar 18, 2024
2 parents c48e0d3 + 8280690 commit 2b5e829
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 15 deletions.
32 changes: 25 additions & 7 deletions deployments/helm/KubeArmor/templates/crds/hsp.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@

---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.4.1
creationTimestamp: null
name: kubearmorhostpolicies.security.kubearmor.com
spec:
group: security.kubearmor.com
Expand All @@ -15,7 +18,19 @@ spec:
singular: kubearmorhostpolicy
scope: Cluster
versions:
- name: v1
- additionalPrinterColumns:
- jsonPath: .metadata.creationTimestamp
name: Age
type: date
- jsonPath: .spec.action
name: Action
priority: 10
type: string
- jsonPath: .spec.nodeSelector.matchLabels
name: Selector
priority: 10
type: string
name: v1
schema:
openAPIV3Schema:
description: KubeArmorHostPolicy is the Schema for the kubearmorhostpolicies
Expand Down Expand Up @@ -97,8 +112,6 @@ spec:
items:
type: string
type: array
required:
- matchCapabilities
type: object
file:
properties:
Expand Down Expand Up @@ -281,8 +294,6 @@ spec:
items:
type: string
type: array
required:
- matchProtocols
type: object
nodeSelector:
properties:
Expand Down Expand Up @@ -346,6 +357,9 @@ spec:
- Audit
- Block
type: string
execname:
pattern: ^[^\/]+$
type: string
fromSource:
items:
properties:
Expand All @@ -369,8 +383,6 @@ spec:
items:
type: string
type: array
required:
- path
type: object
type: array
matchPatterns:
Expand Down Expand Up @@ -1165,3 +1177,9 @@ spec:
storage: true
subresources:
status: {}
status:
acceptedNames:
kind: ""
plural: ""
conditions: []
storedVersions: []
34 changes: 26 additions & 8 deletions deployments/helm/KubeArmor/templates/crds/ksp.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@

---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.4.1
creationTimestamp: null
name: kubearmorpolicies.security.kubearmor.com
spec:
group: security.kubearmor.com
Expand All @@ -15,7 +18,19 @@ spec:
singular: kubearmorpolicy
scope: Namespaced
versions:
- name: v1
- additionalPrinterColumns:
- jsonPath: .metadata.creationTimestamp
name: Age
type: date
- jsonPath: .spec.action
name: Action
priority: 10
type: string
- jsonPath: .spec.selector.matchLabels
name: Selector
priority: 10
type: string
name: v1
schema:
openAPIV3Schema:
description: KubeArmorPolicy is the Schema for the kubearmorpolicies API
Expand Down Expand Up @@ -95,8 +110,6 @@ spec:
items:
type: string
type: array
required:
- matchCapabilities
type: object
file:
properties:
Expand Down Expand Up @@ -278,8 +291,6 @@ spec:
items:
type: string
type: array
required:
- matchProtocols
type: object
process:
properties:
Expand Down Expand Up @@ -336,6 +347,9 @@ spec:
- Audit
- Block
type: string
execname:
pattern: ^[^\/]+$
type: string
fromSource:
items:
properties:
Expand All @@ -359,8 +373,6 @@ spec:
items:
type: string
type: array
required:
- path
type: object
type: array
matchPatterns:
Expand Down Expand Up @@ -1159,4 +1171,10 @@ spec:
served: true
storage: true
subresources:
status: {}
status: {}
status:
acceptedNames:
kind: ""
plural: ""
conditions: []
storedVersions: []
2 changes: 2 additions & 0 deletions pkg/KubeArmorController/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,10 @@ manifests: controller-gen ## Generate WebhookConfiguration, ClusterRole and Cust
go mod tidy; $(CONTROLLER_GEN) $(CRD_OPTIONS) rbac:roleName=manager-role webhook paths="./..." output:crd:artifacts:config=config/crd/bases
cp config/crd/bases/security.kubearmor.com_kubearmorpolicies.yaml ../../deployments/CRD/KubeArmorPolicy.yaml
cp config/crd/bases/security.kubearmor.com_kubearmorpolicies.yaml crd/KubeArmorPolicy.yaml
cp config/crd/bases/security.kubearmor.com_kubearmorpolicies.yaml ../../deployments/helm/KubeArmor/templates/crds/ksp.yaml
cp config/crd/bases/security.kubearmor.com_kubearmorhostpolicies.yaml ../../deployments/CRD/KubeArmorHostPolicy.yaml
cp config/crd/bases/security.kubearmor.com_kubearmorhostpolicies.yaml crd/KubeArmorHostPolicy.yaml
cp config/crd/bases/security.kubearmor.com_kubearmorhostpolicies.yaml ../../deployments/helm/KubeArmor/templates/crds/hsp.yaml

.PHONY: generate
generate: controller-gen ## Generate code containing DeepCopy, DeepCopyInto, and DeepCopyObject method implementations.
Expand Down

0 comments on commit 2b5e829

Please sign in to comment.