Skip to content

Commit

Permalink
Revert "Implement manifests for Index Management Job (#2235)"
Browse files Browse the repository at this point in the history
This reverts commit 3dc099a.
  • Loading branch information
ykadowak committed Nov 30, 2023
1 parent e9f56b2 commit 16c5706
Show file tree
Hide file tree
Showing 28 changed files with 592 additions and 8,697 deletions.
2 changes: 0 additions & 2 deletions Makefile.d/k8s.mk
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,6 @@ k8s/manifest/update: \
mv $(TEMP_DIR)/vald/templates/gateway/lb k8s/gateway/lb
mv $(TEMP_DIR)/vald/templates/manager/index k8s/manager/index
mv $(TEMP_DIR)/vald/templates/index/job/correction k8s/index/job/correction
mv $(TEMP_DIR)/vald/templates/index/job/creation k8s/index/job/creation
mv $(TEMP_DIR)/vald/templates/index/job/save k8s/index/job/save
rm -rf $(TEMP_DIR)

.PHONY: k8s/manifest/helm-operator/clean
Expand Down
2,273 changes: 162 additions & 2,111 deletions charts/vald-helm-operator/crds/valdrelease.yaml

Large diffs are not rendered by default.

20 changes: 3 additions & 17 deletions charts/vald/templates/agent/networkpolicy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,10 @@
# limitations under the License.
#

{{- $agent := .Values.agent -}}
{{- $lb := .Values.gateway.lb -}}
{{- $index := .Values.manager.index -}}
{{- $agent := .Values.agent -}}
{{- $lb := .Values.gateway.lb -}}
{{- $index := .Values.manager.index -}}
{{- $corrector := .Values.manager.index.corrector -}}
{{- $creator := .Values.manager.index.creator -}}
{{- $saver := .Values.manager.index.saver -}}
{{- if .Values.defaults.networkPolicy.enabled }}
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
Expand Down Expand Up @@ -53,18 +51,6 @@ spec:
podSelector:
matchLabels:
app: {{ $corrector.name }}
- namespaceSelector:
matchLabels:
kubernetes.io/metadata.name: {{ .Release.Namespace }}
podSelector:
matchLabels:
app: {{ $creator.name }}
- namespaceSelector:
matchLabels:
kubernetes.io/metadata.name: {{ .Release.Namespace }}
podSelector:
matchLabels:
app: {{ $saver.name }}
{{- if .Values.defaults.networkPolicy.custom.ingress }}
{{- toYaml .Values.defaults.networkPolicy.custom.ingress | nindent 4 }}
{{- end }}
Expand Down
20 changes: 3 additions & 17 deletions charts/vald/templates/discoverer/networkpolicy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,9 @@
#

{{- $discoverer := .Values.discoverer -}}
{{- $lb := .Values.gateway.lb -}}
{{- $index := .Values.manager.index -}}
{{- $corrector := .Values.manager.index.corrector -}}
{{- $creator := .Values.manager.index.creator -}}
{{- $saver := .Values.manager.index.saver -}}
{{- $lb := .Values.gateway.lb -}}
{{- $index := .Values.manager.index -}}
{{- $corrector := .Values.manager.index.corrector -}}
{{- if .Values.defaults.networkPolicy.enabled }}
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
Expand Down Expand Up @@ -55,18 +53,6 @@ spec:
podSelector:
matchLabels:
app: {{ $corrector.name }}
- namespaceSelector:
matchLabels:
kubernetes.io/metadata.name: {{ .Release.Namespace }}
podSelector:
matchLabels:
app: {{ $creator.name }}
- namespaceSelector:
matchLabels:
kubernetes.io/metadata.name: {{ .Release.Namespace }}
podSelector:
matchLabels:
app: {{ $saver.name }}
{{- if .Values.defaults.networkPolicy.custom.ingress }}
{{- toYaml .Values.defaults.networkPolicy.custom.ingress | nindent 4 }}
{{- end }}
Expand Down
4 changes: 2 additions & 2 deletions charts/vald/templates/index/job/correction/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,12 @@ data:
agent_namespace: {{ $index.indexer.agent_namespace | quote }}
node_name: {{ $index.indexer.node_name | quote }}
stream_list_concurrency: {{ $corrector.stream_list_concurrency }}
kvs_async_write_concurrency: {{ $corrector.kvs_async_write_concurrency }}
bbolt_async_write_concurrency: {{ $corrector.bbolt_async_write_concurrency }}
index_replica: {{ $gateway.gateway_config.index_replica }}
discoverer:
duration: {{ $corrector.discoverer.duration }}
client:
{{- $discovererClient := $index.corrector.discoverer.client }}
{{- $discovererClient := $index.indexer.discoverer.client }}
{{- $discovererServerPort := $discoverer.server_config.servers.grpc.port }}
{{- $defaultDiscovererHost := printf "%s.%s.svc.cluster.local" $discoverer.name .Release.Namespace }}
{{- $defaultDiscovererPort := default .Values.defaults.server_config.servers.grpc.port $discovererServerPort }}
Expand Down
17 changes: 2 additions & 15 deletions charts/vald/templates/index/job/correction/cronjob.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#

{{- $corrector := .Values.manager.index.corrector -}}
{{- if $corrector.enabled }}
apiVersion: batch/v1
Expand All @@ -27,7 +28,7 @@ metadata:
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/version: {{ .Chart.Version }}
spec:
schedule: {{ $corrector.schedule | quote }}
schedule: {{ $corrector.schedule }}
concurrencyPolicy: Forbid
suspend: {{ $corrector.suspend }}
startingDeadlineSeconds: {{ $corrector.startingDeadlineSeconds }}
Expand All @@ -38,21 +39,7 @@ spec:
metadata:
labels:
app: {{ $corrector.name }}
annotations:
{{- $pprof := default .Values.defaults.server_config.metrics.pprof $corrector.server_config.metrics.pprof -}}
{{- if $pprof.enabled }}
pyroscope.io/scrape: "true"
pyroscope.io/application-name: {{ $corrector.name }}
pyroscope.io/profile-cpu-enabled: "true"
pyroscope.io/profile-mem-enabled: "true"
pyroscope.io/port: {{ $pprof.port | quote }}
{{- end }}
spec:
{{- if $corrector.initContainers }}
initContainers:
{{- $initContainers := dict "initContainers" $corrector.initContainers "Values" .Values "namespace" .Release.Namespace -}}
{{- include "vald.initContainers" $initContainers | trim | nindent 12 }}
{{- end }}
containers:
- name: {{ $corrector.name }}
image: "{{ $corrector.image.repository }}:{{ default .Values.defaults.image.tag $corrector.image.tag }}"
Expand Down
60 changes: 0 additions & 60 deletions charts/vald/templates/index/job/correction/networkpolicy.yaml

This file was deleted.

70 changes: 0 additions & 70 deletions charts/vald/templates/index/job/creation/configmap.yaml

This file was deleted.

78 changes: 0 additions & 78 deletions charts/vald/templates/index/job/creation/cronjob.yaml

This file was deleted.

Loading

0 comments on commit 16c5706

Please sign in to comment.