-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add service metadata endpoints * New release 1.5.0-unstable (#70) Co-authored-by: aalexandru <[email protected]> * Add chargebackBusinessUnit field; Remove k8sInfraRelease field (#74) * Add chargebackBusinessUnit field; Remove k8sInfraRelease field * Fix go deps * go mod tidy * Updated controller-gen version * Fix go.sum imports * Bump go version to 1.21 * Refactor deprecated clientConfig * Refactor clientConfig webhook configuration * Fix G304 (CWE-22) * Add missing license * Update makefile K8S_VERSION to 1.25.0 * Update controller-gen crd options --------- Co-authored-by: aalexandru <[email protected]> * Add recommended helm labels (#71) * Add recommended helm labels * Increase chart version * New release 1.4.2 (#75) Co-authored-by: aalexandru <[email protected]> * Fix leader election (#76) Co-authored-by: aalexandru <[email protected]> * Update kind version * Add new crd & controller reconciliation logic * Updated serviceMetadata patching logic * make swagger * Add chargebackBusinessUnit field; Remove k8sInfraRelease field (#74) * Add chargebackBusinessUnit field; Remove k8sInfraRelease field * Fix go deps * go mod tidy * Updated controller-gen version * Fix go.sum imports * Bump go version to 1.21 * Refactor deprecated clientConfig * Refactor clientConfig webhook configuration * Fix G304 (CWE-22) * Add missing license * Update makefile K8S_VERSION to 1.25.0 * Update controller-gen crd options --------- Co-authored-by: aalexandru <[email protected]> * Update kind version * Add new crd & controller reconciliation logic * Updated serviceMetadata patching logic * make swagger * Add client config defaults * Updated service metadata patching logic * Ignore service object delete events * Fix linting errors * Add missing license --------- Co-authored-by: aalexandru <[email protected]> Co-authored-by: caradu <[email protected]>
- Loading branch information
1 parent
43687cd
commit 5652474
Showing
36 changed files
with
1,800 additions
and
94 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -217,7 +217,7 @@ kustomize: ## Download kustomize locally if necessary. | |
@[ -f $(KUSTOMIZE) ] || GOBIN=$(shell pwd)/bin go install sigs.k8s.io/kustomize/kustomize/[email protected] | ||
|
||
manifests: controller-gen ## Generate WebhookConfiguration, ClusterRole and CustomResourceDefinition objects. | ||
$(CONTROLLER_GEN) $(CRD_OPTIONS) rbac:roleName=$(MANAGER_ROLE) webhook paths="$(shell pwd)/pkg/api/..." output:crd:artifacts:config=$(shell pwd)/config/crd/bases output:rbac:artifacts:config=$(shell pwd)/config/rbac | ||
$(CONTROLLER_GEN) $(CRD_OPTIONS) rbac:roleName=$(MANAGER_ROLE) webhook paths="$(shell pwd)/pkg/..." output:crd:artifacts:config=$(shell pwd)/config/crd/bases output:rbac:artifacts:config=$(shell pwd)/config/rbac | ||
|
||
generate: controller-gen ## Generate code containing DeepCopy, DeepCopyInto, and DeepCopyObject method implementations. | ||
$(CONTROLLER_GEN) object:headerFile="$(shell pwd)/hack/boilerplate.go.txt" paths="$(shell pwd)/pkg/api/..." | ||
|
@@ -229,5 +229,5 @@ generate: controller-gen ## Generate code containing DeepCopy, DeepCopyInto, and | |
|
||
SWAGGER_CLI = $(shell pwd)/bin/swag | ||
swagger: | ||
@[ -f $(SWAGGER_CLI) ] || GOBIN=$(shell pwd)/bin go install github.com/swaggo/swag/cmd/swag@v1.8.12 | ||
@[ -f $(SWAGGER_CLI) ] || GOBIN=$(shell pwd)/bin go install github.com/swaggo/swag/cmd/swag@v1.16.2 | ||
$(SWAGGER_CLI) init --parseDependency --parseInternal --parseDepth 2 -g cmd/apiserver/apiserver.go --output pkg/apiserver/docs/ |
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
82 changes: 82 additions & 0 deletions
82
config/crd/bases/registry.ethos.adobe.com_servicemetadatawatchers.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,82 @@ | ||
--- | ||
apiVersion: apiextensions.k8s.io/v1 | ||
kind: CustomResourceDefinition | ||
metadata: | ||
annotations: | ||
controller-gen.kubebuilder.io/version: v0.13.0 | ||
name: servicemetadatawatchers.registry.ethos.adobe.com | ||
spec: | ||
group: registry.ethos.adobe.com | ||
names: | ||
kind: ServiceMetadataWatcher | ||
listKind: ServiceMetadataWatcherList | ||
plural: servicemetadatawatchers | ||
singular: servicemetadatawatcher | ||
scope: Namespaced | ||
versions: | ||
- name: v1alpha1 | ||
schema: | ||
openAPIV3Schema: | ||
description: ServiceMetadataWatcher is the Schema for the servicemetadatawatchers | ||
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: ServiceMetadataWatcherSpec defines the desired state of ServiceMetadataWatcher | ||
properties: | ||
watchedServiceObjects: | ||
items: | ||
properties: | ||
objectReference: | ||
properties: | ||
apiVersion: | ||
type: string | ||
kind: | ||
type: string | ||
name: | ||
type: string | ||
required: | ||
- apiVersion | ||
- kind | ||
- name | ||
type: object | ||
watchedFields: | ||
items: | ||
properties: | ||
dst: | ||
type: string | ||
src: | ||
type: string | ||
required: | ||
- dst | ||
- src | ||
type: object | ||
type: array | ||
required: | ||
- objectReference | ||
- watchedFields | ||
type: object | ||
type: array | ||
required: | ||
- watchedServiceObjects | ||
type: object | ||
status: | ||
description: ServiceMetadataWatcherStatus defines the observed state of | ||
ServiceMetadataWatcher | ||
type: object | ||
type: object | ||
served: true | ||
storage: true | ||
subresources: | ||
status: {} |
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
7 changes: 7 additions & 0 deletions
7
config/crd/patches/cainjection_in_servicemetadatawatchers.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,7 @@ | ||
# The following patch adds a directive for certmanager to inject CA into the CRD | ||
apiVersion: apiextensions.k8s.io/v1 | ||
kind: CustomResourceDefinition | ||
metadata: | ||
annotations: | ||
cert-manager.io/inject-ca-from: CERTIFICATE_NAMESPACE/CERTIFICATE_NAME | ||
name: servicemetadatawatchers.registry.ethos.adobe.com |
16 changes: 16 additions & 0 deletions
16
config/crd/patches/webhook_in_servicemetadatawatchers.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,16 @@ | ||
# The following patch enables a conversion webhook for the CRD | ||
apiVersion: apiextensions.k8s.io/v1 | ||
kind: CustomResourceDefinition | ||
metadata: | ||
name: servicemetadatawatchers.registry.ethos.adobe.com | ||
spec: | ||
conversion: | ||
strategy: Webhook | ||
webhook: | ||
clientConfig: | ||
service: | ||
namespace: system | ||
name: webhook-service | ||
path: /convert | ||
conversionReviewVersions: | ||
- v1 |
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,31 @@ | ||
# permissions for end users to edit servicemetadatawatchers. | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRole | ||
metadata: | ||
labels: | ||
app.kubernetes.io/name: clusterrole | ||
app.kubernetes.io/instance: servicemetadatawatcher-editor-role | ||
app.kubernetes.io/component: rbac | ||
app.kubernetes.io/created-by: cluster-registry | ||
app.kubernetes.io/part-of: cluster-registry | ||
app.kubernetes.io/managed-by: kustomize | ||
name: servicemetadatawatcher-editor-role | ||
rules: | ||
- apiGroups: | ||
- registry.ethos.adobe.com | ||
resources: | ||
- servicemetadatawatchers | ||
verbs: | ||
- create | ||
- delete | ||
- get | ||
- list | ||
- patch | ||
- update | ||
- watch | ||
- apiGroups: | ||
- registry.ethos.adobe.com | ||
resources: | ||
- servicemetadatawatchers/status | ||
verbs: | ||
- get |
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,27 @@ | ||
# permissions for end users to view servicemetadatawatchers. | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRole | ||
metadata: | ||
labels: | ||
app.kubernetes.io/name: clusterrole | ||
app.kubernetes.io/instance: servicemetadatawatcher-viewer-role | ||
app.kubernetes.io/component: rbac | ||
app.kubernetes.io/created-by: cluster-registry | ||
app.kubernetes.io/part-of: cluster-registry | ||
app.kubernetes.io/managed-by: kustomize | ||
name: servicemetadatawatcher-viewer-role | ||
rules: | ||
- apiGroups: | ||
- registry.ethos.adobe.com | ||
resources: | ||
- servicemetadatawatchers | ||
verbs: | ||
- get | ||
- list | ||
- watch | ||
- apiGroups: | ||
- registry.ethos.adobe.com | ||
resources: | ||
- servicemetadatawatchers/status | ||
verbs: | ||
- get |
Oops, something went wrong.