File tree Expand file tree Collapse file tree 3 files changed +45
-13
lines changed
Expand file tree Collapse file tree 3 files changed +45
-13
lines changed Original file line number Diff line number Diff line change @@ -75,6 +75,12 @@ test: fmt vet ## Run tests.
7575build : fmt vet # # Build manager binary.
7676 go build -o bin/manager cmd/main.go
7777
78+ .PHONY : generate
79+ generate : # # Generate code and manifests (CRDs, RBAC, webhooks)
80+ $(shell go env GOPATH) /bin/controller-gen object:headerFile=" hack/boilerplate.go.txt" paths=" ./api/..."
81+ $(shell go env GOPATH) /bin/controller-gen crd:allowDangerousTypes=true paths=" ./api/..." output:crd:artifacts:config=config/crd/bases
82+ cp config/crd/bases/kagent.dev_hooks.yaml helm/khook-crds/crds/kagent.dev_hooks.yaml
83+
7884.PHONY : run
7985run : fmt vet # # Run a controller from your host.
8086 go run ./cmd/main.go
@@ -137,7 +143,7 @@ helm-version:
137143 helm package -d $(HELM_DIST_FOLDER ) helm/khook-crds
138144 helm package -d $(HELM_DIST_FOLDER ) helm/khook
139145
140- .PHONY: helm-publish
146+ .PHONY : helm-publish
141147helm-publish : helm-version
142148 helm push ./$(HELM_DIST_FOLDER ) /khook-crds-$(VERSION ) .tgz $(HELM_REPO ) /khook/helm
143149 helm push ./$(HELM_DIST_FOLDER ) /khook-$(VERSION ) .tgz $(HELM_REPO ) /khook/helm
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
33kind : CustomResourceDefinition
44metadata :
55 annotations :
6- controller-gen.kubebuilder.io/version : v0.18 .0
6+ controller-gen.kubebuilder.io/version : v0.19 .0
77 name : hooks.kagent.dev
88spec :
99 group : kagent.dev
@@ -45,11 +45,24 @@ spec:
4545 items :
4646 description : EventConfiguration defines a single event type configuration
4747 properties :
48- agentId :
49- description : AgentId specifies the Kagent agent to call when
48+ agentRef :
49+ description : AgentRef specifies the Kagent agent to call when
5050 this event occurs
51- minLength : 1
52- type : string
51+ properties :
52+ name :
53+ description : |-
54+ Name of the referent.
55+ More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
56+ minLength : 1
57+ type : string
58+ namespace :
59+ description : |-
60+ Namespace of the referent.
61+ If unspecified, the namespace of the Hook will be used.
62+ type : string
63+ required :
64+ - name
65+ type : object
5366 eventType :
5467 description : EventType specifies the type of Kubernetes event
5568 to monitor
6578 minLength : 1
6679 type : string
6780 required :
68- - agentId
81+ - agentRef
6982 - eventType
7083 - prompt
7184 type : object
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
33kind : CustomResourceDefinition
44metadata :
55 annotations :
6- controller-gen.kubebuilder.io/version : v0.18 .0
6+ controller-gen.kubebuilder.io/version : v0.19 .0
77 name : hooks.kagent.dev
88spec :
99 group : kagent.dev
@@ -45,11 +45,24 @@ spec:
4545 items :
4646 description : EventConfiguration defines a single event type configuration
4747 properties :
48- agentId :
49- description : AgentId specifies the Kagent agent to call when
48+ agentRef :
49+ description : AgentRef specifies the Kagent agent to call when
5050 this event occurs
51- minLength : 1
52- type : string
51+ properties :
52+ name :
53+ description : |-
54+ Name of the referent.
55+ More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
56+ minLength : 1
57+ type : string
58+ namespace :
59+ description : |-
60+ Namespace of the referent.
61+ If unspecified, the namespace of the Hook will be used.
62+ type : string
63+ required :
64+ - name
65+ type : object
5366 eventType :
5467 description : EventType specifies the type of Kubernetes event
5568 to monitor
6578 minLength : 1
6679 type : string
6780 required :
68- - agentId
81+ - agentRef
6982 - eventType
7083 - prompt
7184 type : object
You can’t perform that action at this time.
0 commit comments