Skip to content

Commit

Permalink
Checkpoint probably working state after refactoring
Browse files Browse the repository at this point in the history
Signed-off-by: Tanner Lewis <lewijacn@amazon.com>
  • Loading branch information
lewijacn committed Oct 25, 2024
1 parent b1567d4 commit 76cab7f
Show file tree
Hide file tree
Showing 20 changed files with 204 additions and 232 deletions.
13 changes: 11 additions & 2 deletions deployment/k8/migration-assistant/Chart.lock
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
dependencies:
- name: elasticsearch-searchguard
repository: file://../services/elasticsearch-searchguard
version: 0.1.0
- name: opensearch
repository: https://opensearch-project.github.io/helm-charts/
version: 2.23.1
Expand All @@ -8,8 +11,14 @@ dependencies:
- name: migration-console
repository: file://../services/migration-console
version: 0.1.0
- name: replayer
repository: file://../services/replayer
version: 0.1.0
- name: capture-proxy
repository: file://../services/capture-proxy
version: 0.1.0
digest: sha256:3dcd125d6e968ddfc212318128d5f4222822bf33d0593f061f3c2eed40cea144
generated: "2024-10-24T15:36:04.42393-05:00"
- name: reindex-from-snapshot
repository: file://../services/reindex-from-snapshot
version: 0.1.0
digest: sha256:75708d0e2a26a754d107a29d373a76664ac19d8660fd7534088e30a6448424d2
generated: "2024-10-25T15:58:15.451913-05:00"
14 changes: 8 additions & 6 deletions deployment/k8/migration-assistant/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@ apiVersion: v2
name: migration-assistant
version: 0.1.0
dependencies:
# - name: elasticsearch
# version: "0.1.0"
# repository: "file://../services/elasticsearch"
- name: elasticsearch-searchguard
version: "0.1.0"
repository: "file://../services/elasticsearch-searchguard"
condition: elasticsearch-searchguard-enabled
- name: opensearch
version: "2.23.1"
repository: "https://opensearch-project.github.io/helm-charts/"
Expand All @@ -26,6 +27,7 @@ dependencies:
version: "0.1.0"
repository: "file://../services/capture-proxy"
condition: capture-proxy-enabled
# - name: reindex-from-snapshot
# version: "0.1.0"
# repository: "file://../services/reindex-from-snapshot"
- name: reindex-from-snapshot
version: "0.1.0"
repository: "file://../services/reindex-from-snapshot"
condition: reindex-from-snapshot-enabled
10 changes: 6 additions & 4 deletions deployment/k8/migration-assistant/values.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
# Define all enabled/disabled migration services
migration-console-enabled: true
capture-proxy-enabled: false
replayer-enabled: false
kafka-op-enabled: false
opensearch-helm-enabled: false
capture-proxy-enabled: true
replayer-enabled: true
kafka-op-enabled: true
reindex-from-snapshot-enabled: true
elasticsearch-searchguard-enabled: true
opensearch-helm-enabled: true

# Define specific dependency configuration
opensearch-helm:
Expand Down
19 changes: 18 additions & 1 deletion deployment/k8/services/capture-proxy/templates/deployment.yml
Original file line number Diff line number Diff line change
@@ -1 +1,18 @@
{{- include "common-lib.deployment.yml" . }}
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ .Chart.Name }}
labels:
app: {{ .Chart.Name }}
spec:
replicas: {{ .Values.replicaCount }}
selector:
matchLabels:
app: {{ .Chart.Name }}
template:
metadata:
labels:
app: {{ .Chart.Name }}
spec:
{{- include "common-lib.containers" . | nindent 10 }}
{{- include "common-lib.volumes" . | nindent 10 }}
15 changes: 14 additions & 1 deletion deployment/k8/services/capture-proxy/templates/service.yml
Original file line number Diff line number Diff line change
@@ -1 +1,14 @@
{{- include "common-lib.service.yml" . }}
apiVersion: v1
kind: Service
metadata:
name: {{ .Chart.Name }}
labels:
app: {{ .Chart.Name }}
spec:
type: {{ .Values.service.type }}
ports:
- port: {{ .Values.service.port }}
protocol: TCP
targetPort: {{ .Values.service.targetPort }}
selector:
app: {{ .Chart.Name }}
2 changes: 1 addition & 1 deletion deployment/k8/services/capture-proxy/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ container:
--insecureDestination
--listenPort 9200
--sslConfigFile /usr/share/elasticsearch/config/proxy_tls.yml
--otelCollectorEndpoint http://localhost:4317
#--otelCollectorEndpoint http://localhost:4317
resources:
limits:
cpu: 100m
Expand Down
31 changes: 31 additions & 0 deletions deployment/k8/services/common-lib/templates/_containers.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{{- define "common-lib.containers" -}}
containers:
- name: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
{{- if and .Values.container .Values.container.command }}
command:
- "/bin/sh"
- "-c"
- "{{ .Values.container.command }}"
{{- end }}
# Load all env variables
env:
{{- range .Values.env }}
- name: {{ .name }}
{{- if .value }}
value: {{ .value }}
{{- end }}
{{- if .configMapKeyRef }}
valueFrom:
configMapKeyRef:
name: {{ .configMapKeyRef.name }}
key: {{ .configMapKeyRef.key }}
{{- end }}
{{- end }}
volumeMounts:
{{- range .Values.volumeMounts }}
- name: {{ .name }}
mountPath: {{ .mountPath }}
{{- end }}
{{- end }}
68 changes: 0 additions & 68 deletions deployment/k8/services/common-lib/templates/_deployment.yaml

This file was deleted.

21 changes: 0 additions & 21 deletions deployment/k8/services/common-lib/templates/_otel-collector.yaml

This file was deleted.

16 changes: 0 additions & 16 deletions deployment/k8/services/common-lib/templates/_service.yaml

This file was deleted.

23 changes: 23 additions & 0 deletions deployment/k8/services/common-lib/templates/_volumes.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{{- define "common-lib.volumes" -}}
volumes:
{{- range .Values.volumes }}
- name: {{ .name }}
{{- if .configMap }}
configMap:
name: {{ .configMap.name }}
{{- end }}
{{- if .secret }}
secret:
secretName: {{ .secret.secretName }}
{{- end }}
{{- if .persistentVolumeClaim }}
persistentVolumeClaim:
claimName: {{ .persistentVolumeClaim.claimName }}
{{- end }}
{{- if .hostPath }}
hostPath:
path: {{ .hostPath.path }}
type: {{ .hostPath.type | default "DirectoryOrCreate" }}
{{- end }}
{{- end }}
{{- end }}
9 changes: 9 additions & 0 deletions deployment/k8/services/elasticsearch-searchguard/Chart.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
dependencies:
- name: common-lib
repository: file://../common-lib
version: 0.1.0
- name: snapshot-vol
repository: file://../../shared/snapshot-vol
version: 0.1.0
digest: sha256:746aa94f95f49db2c8b4bda1f8fdfb75cf6d8e9e74a45fa8fa9111a44d85685a
generated: "2024-10-25T15:54:59.384586-05:00"
7 changes: 7 additions & 0 deletions deployment/k8/services/elasticsearch-searchguard/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,10 @@ description: A Helm chart to install Elasticsearch with Searchguard
type: application
version: 0.1.0
appVersion: "1.16.0"
dependencies:
- name: common-lib
version: "0.1.0"
repository: "file://../common-lib"
- name: snapshot-vol
version: "0.1.0"
repository: "file://../../shared/snapshot-vol"
Original file line number Diff line number Diff line change
Expand Up @@ -14,23 +14,5 @@ spec:
labels:
app: {{ .Chart.Name }}
spec:
containers:
- name: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
ports:
- containerPort: {{ .Values.service.targetPort }}
# Load all env variables
env:
{{- range $key, $value := .Values.env }}
- name: {{ $key }}
value: {{ $value | quote }}
{{- end }}
volumeMounts:
- name: {{ .Values.snapshotVolume.volumeName }}
mountPath: {{ .Values.snapshotVolume.mountPath }}
volumes:
- name: {{ .Values.snapshotVolume.volumeName }}
persistentVolumeClaim:
claimName: {{ .Values.snapshotVolume.pvcClaimName }}
# TODO Add PVC
{{- include "common-lib.containers" . | nindent 6 }}
{{- include "common-lib.volumes" . | nindent 6 }}
Original file line number Diff line number Diff line change
@@ -1 +1,18 @@
{{- include "common-lib.deployment.yml" . }}
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ .Chart.Name }}
labels:
app: {{ .Chart.Name }}
spec:
replicas: {{ .Values.replicaCount }}
selector:
matchLabels:
app: {{ .Chart.Name }}
template:
metadata:
labels:
app: {{ .Chart.Name }}
spec:
{{- include "common-lib.containers" . | nindent 6 }}
{{- include "common-lib.volumes" . | nindent 6 }}
12 changes: 12 additions & 0 deletions deployment/k8/services/reindex-from-snapshot/Chart.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
dependencies:
- name: common-lib
repository: file://../common-lib
version: 0.1.0
- name: snapshot-vol
repository: file://../../shared/snapshot-vol
version: 0.1.0
- name: shared-logs-vol
repository: file://../../shared/shared-logs-vol
version: 0.1.0
digest: sha256:1860cec80cc6e28129a61bf237e9fde1661dc63cc4ef58534982d23da0b63c75
generated: "2024-10-25T15:31:06.278589-05:00"
10 changes: 10 additions & 0 deletions deployment/k8/services/reindex-from-snapshot/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,13 @@ description: A Helm chart to install Reindex-from-Snapshot (RFS)
type: application
version: 0.1.0
appVersion: "1.16.0"
dependencies:
- name: common-lib
version: "0.1.0"
repository: "file://../common-lib"
- name: snapshot-vol
version: "0.1.0"
repository: "file://../../shared/snapshot-vol"
- name: shared-logs-vol
version: "0.1.0"
repository: "file://../../shared/shared-logs-vol"
Loading

0 comments on commit 76cab7f

Please sign in to comment.