diff --git a/Justfile b/Justfile index 19a9a5e77c..db0ef69703 100644 --- a/Justfile +++ b/Justfile @@ -70,7 +70,7 @@ DOCKER_IMAGES := ''' "timeline": {}, "lease": {}, "admin": {}, - "schemaservice": {} + "schema": {} } ''' USER_HERMIT_PACKAGES := "openjdk maven" diff --git a/charts/ftl/templates/_helpers.tpl b/charts/ftl/templates/_helpers.tpl index 967e6224ff..b1efbcc2de 100644 --- a/charts/ftl/templates/_helpers.tpl +++ b/charts/ftl/templates/_helpers.tpl @@ -77,8 +77,8 @@ app.kubernetes.io/name: {{ include "ftl.fullname" . }} app.kubernetes.io/component: admin app.kubernetes.io/instance: {{ .Release.Name }} {{- end -}} -{{- define "ftl-schemaservice.selectorLabels" -}} +{{- define "ftl-schema.selectorLabels" -}} app.kubernetes.io/name: {{ include "ftl.fullname" . }} -app.kubernetes.io/component: schemaservice +app.kubernetes.io/component: schema app.kubernetes.io/instance: {{ .Release.Name }} -{{- end -}} +{{- end -}} \ No newline at end of file diff --git a/charts/ftl/templates/cron-deployment.yaml b/charts/ftl/templates/cron-deployment.yaml index e33b5b8357..f85ab8099c 100644 --- a/charts/ftl/templates/cron-deployment.yaml +++ b/charts/ftl/templates/cron-deployment.yaml @@ -38,7 +38,7 @@ spec: - name: FTL_TIMELINE_ENDPOINT value: "http://{{ .Values.timeline.service.name }}:{{ .Values.timeline.service.port }}" - name: FTL_SCHEMA_ENDPOINT - value: "http://{{ .Values.schemaservice.service.name }}:{{ .Values.schemaservice.service.port }}" + value: "http://{{ .Values.schema.service.name }}:{{ .Values.schema.service.port }}" {{- if .Values.cron.nodeSelector }} nodeSelector: {{- toYaml .Values.cron.nodeSelector | nindent 8 }} diff --git a/charts/ftl/templates/schema-role.yaml b/charts/ftl/templates/schema-role.yaml index 01d4870a9e..b3810636ee 100644 --- a/charts/ftl/templates/schema-role.yaml +++ b/charts/ftl/templates/schema-role.yaml @@ -1,8 +1,8 @@ -{{- if .Values.schemaservice.enabled }} +{{- if .Values.schema.enabled }} apiVersion: v1 kind: ServiceAccount metadata: - name: {{ .Values.schemaservice.serviceAccountName }} + name: {{ .Values.schema.serviceAccountName }} namespace: {{ .Release.Namespace }} {{- end }} diff --git a/charts/ftl/templates/schema-services.yaml b/charts/ftl/templates/schema-services.yaml index 4e37900cba..d12929d115 100644 --- a/charts/ftl/templates/schema-services.yaml +++ b/charts/ftl/templates/schema-services.yaml @@ -3,14 +3,14 @@ kind: Service metadata: labels: {{- include "ftl.labels" . | nindent 4 }} - name: {{ include "ftl.fullname" . }}-schemaservice - {{- if .Values.schemaservice.service.annotations }} + name: {{ include "ftl.fullname" . }}-schema + {{- if .Values.schema.service.annotations }} annotations: - {{- toYaml .Values.schemaservice.service.annotations | nindent 4 }} + {{- toYaml .Values.schema.service.annotations | nindent 4 }} {{- end }} spec: ports: - {{- range .Values.schemaservice.service.ports }} + {{- range .Values.schema.service.ports }} - name: {{ .name }} port: {{ .port }} protocol: {{ .protocol | default "TCP" }} @@ -21,4 +21,4 @@ spec: {{- end }} selector: {{- include "ftl-schema.selectorLabels" . | nindent 4 }} - type: {{ .Values.schemaservice.service.type | default "ClusterIP" }} + type: {{ .Values.schema.service.type | default "ClusterIP" }} diff --git a/charts/ftl/templates/schema.yaml b/charts/ftl/templates/schema.yaml index 6a0b356615..894519790b 100644 --- a/charts/ftl/templates/schema.yaml +++ b/charts/ftl/templates/schema.yaml @@ -2,12 +2,12 @@ apiVersion: apps/v1 kind: Deployment metadata: - name: {{ include "ftl.fullname" . }}-schemaservice + name: {{ include "ftl.fullname" . }}-schema labels: {{- include "ftl.labels" . | nindent 4 }} spec: - replicas: {{ .Values.schemaservice.replicas }} - revisionHistoryLimit: {{ .Values.schemaservice.revisionHistoryLimit }} + replicas: {{ .Values.schema.replicas }} + revisionHistoryLimit: {{ .Values.schema.revisionHistoryLimit }} selector: matchLabels: {{- include "ftl-schema.selectorLabels" . | nindent 6 }} @@ -15,20 +15,20 @@ spec: metadata: labels: {{- include "ftl-schema.selectorLabels" . | nindent 8 }} - {{- if .Values.schemaservice.podAnnotations }} + {{- if .Values.schema.podAnnotations }} annotations: - {{- toYaml .Values.schemaservice.podAnnotations | nindent 8 }} + {{- toYaml .Values.schema.podAnnotations | nindent 8 }} {{- end }} spec: - serviceAccountName: {{ .Values.schemaservice.serviceAccountName }} + serviceAccountName: {{ .Values.schema.serviceAccountName }} containers: - name: app - image: "{{ .Values.schemaservice.image.repository }}:{{ .Values.schemaservice.image.tag | default $version }}" - imagePullPolicy: {{ .Values.schemaservice.image.pullPolicy }} - {{- if .Values.schemaservice.envFrom }} + image: "{{ .Values.schema.image.repository }}:{{ .Values.schema.image.tag | default $version }}" + imagePullPolicy: {{ .Values.schema.image.pullPolicy }} + {{- if .Values.schema.envFrom }} envFrom: - {{- if .Values.schemaservice.envFrom }} - {{- toYaml .Values.schemaservice.envFrom | nindent 12 }} + {{- if .Values.schema.envFrom }} + {{- toYaml .Values.schema.envFrom | nindent 12 }} {{- end }} {{- else if or .Values.secrets.logEncryptionKey .Values.secrets.asyncEncryptionKey }} envFrom: @@ -36,43 +36,43 @@ spec: name: {{ include "ftl.fullname" . }}-secrets {{- end }} env: - {{- if .Values.schemaservice.env }} - {{- toYaml .Values.schemaservice.env | nindent 12 }} + {{- if .Values.schema.env }} + {{- toYaml .Values.schema.env | nindent 12 }} {{- end }} - name: FTL_BIND - value: "http://0.0.0.0:{{ (index .Values.schemaservice.ports 0).containerPort }}" + value: "http://0.0.0.0:{{ (index .Values.schema.ports 0).containerPort }}" ports: - {{- range .Values.schemaservice.ports }} + {{- range .Values.schema.ports }} - name: {{ .name }} containerPort: {{ .containerPort }} protocol: {{ .protocol | default "TCP" }} {{- end }} readinessProbe: - {{- if .Values.schemaservice.readinessProbe }} - {{- toYaml .Values.schemaservice.readinessProbe | nindent 12 }} + {{- if .Values.schema.readinessProbe }} + {{- toYaml .Values.schema.readinessProbe | nindent 12 }} {{- else }} httpGet: path: /healthz - port: {{ (index .Values.schemaservice.ports 0).containerPort }} + port: {{ (index .Values.schema.ports 0).containerPort }} initialDelaySeconds: 1 periodSeconds: 2 timeoutSeconds: 2 successThreshold: 1 failureThreshold: 15 {{- end }} - {{- if .Values.schemaservice.nodeSelector }} + {{- if .Values.schema.nodeSelector }} nodeSelector: - {{- toYaml .Values.schemaservice.nodeSelector | nindent 8 }} + {{- toYaml .Values.schema.nodeSelector | nindent 8 }} {{- end }} - {{- if .Values.schemaservice.affinity }} + {{- if .Values.schema.affinity }} affinity: - {{- toYaml .Values.schemaservice.affinity | nindent 8 }} + {{- toYaml .Values.schema.affinity | nindent 8 }} {{- end }} - {{- if .Values.schemaservice.topologySpreadConstraints }} + {{- if .Values.schema.topologySpreadConstraints }} topologySpreadConstraints: - {{- toYaml .Values.schemaservice.topologySpreadConstraints | nindent 8 }} + {{- toYaml .Values.schema.topologySpreadConstraints | nindent 8 }} {{- end }} - {{- if .Values.schemaservice.tolerations }} + {{- if .Values.schema.tolerations }} tolerations: - {{- toYaml .Values.schemaservice.tolerations | nindent 8 }} + {{- toYaml .Values.schema.tolerations | nindent 8 }} {{- end }} \ No newline at end of file diff --git a/charts/ftl/values.yaml b/charts/ftl/values.yaml index a3e9153e19..e6e23d8ef2 100644 --- a/charts/ftl/values.yaml +++ b/charts/ftl/values.yaml @@ -362,7 +362,7 @@ timeline: topologySpreadConstraints: null tolerations: null -schemaservice: +schema: enabled: true env: - name: MY_POD_IP diff --git a/cmd/ftl-schemaservice/main.go b/cmd/ftl-schema/main.go similarity index 100% rename from cmd/ftl-schemaservice/main.go rename to cmd/ftl-schema/main.go diff --git a/deployment/Justfile b/deployment/Justfile index 130dbf900f..14d857959e 100644 --- a/deployment/Justfile +++ b/deployment/Justfile @@ -23,7 +23,7 @@ rm: teardown # Deploy all components after building images and setting up Istio full-deploy: build-all-images setup-istio-cluster #!/bin/bash - kubectl rollout restart deployment ftl-schemaservice || true # if this exists already restart it to get the latest image + kubectl rollout restart deployment ftl-schema || true # if this exists already restart it to get the latest image kubectl rollout restart deployment ftl-controller || true # if this exists already restart it to get the latest image kubectl rollout restart deployment ftl-provisioner || true # if this exists already restart it to get the latest image kubectl rollout restart deployment ftl-cron || true # if this exists already restart it to get the latest image @@ -36,7 +36,7 @@ full-deploy: build-all-images setup-istio-cluster # Wait for core Kubernetes components to be ready wait-for-kube: #!/bin/bash - kubectl wait --for=condition=available deployment/ftl-schemaservice --timeout=5m + kubectl wait --for=condition=available deployment/ftl-schema --timeout=5m kubectl wait --for=condition=available deployment/ftl-timeline --timeout=5m kubectl wait --for=condition=available deployment/ftl-console --timeout=5m kubectl wait --for=condition=available deployment/ftl-controller --timeout=5m diff --git a/deployment/values-release.yaml b/deployment/values-release.yaml index 3dc42425e1..3f255ff514 100644 --- a/deployment/values-release.yaml +++ b/deployment/values-release.yaml @@ -22,7 +22,7 @@ controller: - name: "http-8891" port: 8891 -schemaservice: +schema: podAnnotations: proxy.istio.io/config: | holdApplicationUntilProxyStarts: true diff --git a/deployment/values.yaml b/deployment/values.yaml index 7731d82ebc..3d962b9c83 100644 --- a/deployment/values.yaml +++ b/deployment/values.yaml @@ -25,7 +25,7 @@ controller: proxy.istio.io/config: | holdApplicationUntilProxyStarts: true sidecar.istio.io/logLevel: "debug" -schemaservice: +schema: image: repository: "ftl:5000/ftl-schema" tag: "latest"