Skip to content

[CLOUD-20] Add OpenSearch labels cleaner controller #21

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ HELMIFY ?= $(LOCALBIN)/helmify
CRD_REF_DOCS ?= $(LOCALBIN)/crd-ref-docs

## Tool Versions
KUSTOMIZE_VERSION ?= v3.8.7
KUSTOMIZE_VERSION ?= v5.6.0
CONTROLLER_TOOLS_VERSION ?= v0.16.3

KUSTOMIZE_INSTALL_SCRIPT ?= "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh"
Expand Down
8 changes: 8 additions & 0 deletions config/manager/config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: cleaner-controller-logs-config
namespace: system
data:
journey: '{{ .Values.opensearch.journey | default "not-configured" }}'
search_index: '{{ .Values.opensearch.search_index | default "not-configured" }}'
29 changes: 29 additions & 0 deletions config/manager/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -1,2 +1,31 @@
resources:
- manager.yaml
- config.yaml

replacements:
- source:
fieldPath: data.journey
kind: ConfigMap
name: cleaner-controller-logs-config
targets:
- fieldPaths:
- spec.template.metadata.labels.journey
select:
kind: Deployment
name: controller-manager
- source:
fieldPath: data.search_index
kind: ConfigMap
name: cleaner-controller-logs-config
targets:
- fieldPaths:
- spec.template.metadata.labels.search_index
select:
kind: Deployment
name: controller-manager
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
images:
- name: controller
newName: public.ecr.aws/f8y0w2c4/cleaner-controller
newTag: manager-local-v0.2.0-beta.3
2 changes: 2 additions & 0 deletions config/manager/manager.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ spec:
kubectl.kubernetes.io/default-container: manager
labels:
control-plane: controller-manager
journey: "not-configured"
search_index: "not-configured"
spec:
# TODO(user): Uncomment the following code to configure the nodeAffinity expression
# according to the platforms which are supported by your solution.
Expand Down