Skip to content

Commit

Permalink
#395 Upgrade IT infrastructure for JDK 17
Browse files Browse the repository at this point in the history
Update the app naming convention for spark-inf to match the standard
chart name default
Update it test dockerfile to use jdk17
Update it helm Tiltfile to be up to date with recent V2 chart changes
  • Loading branch information
cwoods-cpointe committed Oct 7, 2024
1 parent cbee16b commit d30b9e8
Show file tree
Hide file tree
Showing 11 changed files with 54 additions and 46 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ _**NOTE:**_ *the version should match the aiSSEMBLE project version.*

| Property | Description | Default |
|----------------------------------|-----------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------|
| app.name | Sets label for app.kubernetes.io/name | Chart.Name (aissemble-spark-history-chart) |
| enable | Enable or disable the entirety of the spark-history-server deployment. When false, equivalent to not installing the chart. | true |
| deployment.annotations | Annotations to apply to the Spark History Server Deployment. | {} |
| deployment.labels | Labels to apply to the Spark History Server Deployment. | {} |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,22 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ .Release.Name }}-shs
name: "{{ .Values.app.name | default .Chart.Name }}"
{{- if .Values.deployment.annotations }}
annotations:
{{ toYaml .Values.deployment.annotations | default "" }}
{{- end }}
labels:
app: {{ .Release.Name }}
{{- if .Values.deployment.labels }}
{{ toYaml .Values.deployment.labels }}
{{- end }}
app.kubernetes.io/instance: "{{ .Values.app.name | default .Chart.Name }}"
app.kubernetes.io/name: "{{ .Values.app.name | default .Chart.Name }}"
{{- if .Values.deployment.labels }}
{{ toYaml .Values.deployment.labels }}
{{- end }}
spec:
replicas: {{ .Values.deployment.replicas }}
selector:
matchLabels:
app: {{ .Release.Name }}
name: "{{ .Values.app.name | default .Chart.Name }}"
{{- if .Values.deployment.labels }}
{{ toYaml .Values.deployment.labels }}
{{- end }}
Expand All @@ -27,7 +28,8 @@ spec:
{{ toYaml .Values.deployment.annotations | default "" }}
{{- end }}
labels:
app: {{ .Release.Name }}
app.kubernetes.io/instance: "{{ .Values.app.name | default .Chart.Name }}"
app.kubernetes.io/name: "{{ .Values.app.name | default .Chart.Name }}"
{{- if .Values.deployment.labels }}
{{ toYaml .Values.deployment.labels }}
{{- end }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,20 @@ tests:
deployment.labels.label1: label2
asserts:
- equal:
path: metadata.labels.app
value: RELEASE-NAME
path: spec.selector.matchLabels.name
value: aissemble-spark-history-chart
- equal:
path: spec.template.metadata.labels.app
value: RELEASE-NAME
path: metadata.labels["app.kubernetes.io/instance"]
value: aissemble-spark-history-chart
- equal:
path: spec.selector.matchLabels.app
value: RELEASE-NAME
path: metadata.labels["app.kubernetes.io/name"]
value: aissemble-spark-history-chart
- equal:
path: spec.template.metadata.labels["app.kubernetes.io/instance"]
value: aissemble-spark-history-chart
- equal:
path: spec.template.metadata.labels["app.kubernetes.io/name"]
value: aissemble-spark-history-chart

- it: Should apply requested annotations
set:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# This file contains the default values for the aiSSEMBLE Spark History Helm chart.
app:
# Sets labels for app.kubernetes.io/name Default is Chart.Name (aissemble-spark-history-chart)
name: ''

enable: true

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ _**NOTE:**_ *the version should match the aiSSEMBLE project version.*

| Property | Description | Default |
|----------------------------------|-----------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------|
| app.name | Sets label for app.kubernetes.io/name | Chart.Name (aissemble-thrift-server-chart) |
| enable | Enable or disable the entirety of the spark-thrift-server deployment. When false, equivalent to not installing the chart. | true |
| deployment.annotations | Annotations to apply to the Spark Thrift Server Deployment. | {} |
| deployment.labels | Labels to apply to the Spark Thrift Server Deployment. | {} |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,22 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ .Release.Name }}-sts
name: "{{ .Values.app.name | default .Chart.Name }}"
{{- if .Values.deployment.annotations }}
annotations:
{{ toYaml .Values.deployment.annotations | default "" }}
{{- end }}
labels:
app: {{ .Release.Name }}
{{- if .Values.deployment.labels }}
{{ toYaml .Values.deployment.labels }}
{{- end }}
app.kubernetes.io/instance: "{{ .Values.app.name | default .Chart.Name }}"
app.kubernetes.io/name: "{{ .Values.app.name | default .Chart.Name }}"
{{- if .Values.deployment.labels }}
{{ toYaml .Values.deployment.labels }}
{{- end }}
spec:
replicas: {{ .Values.deployment.replicas }}
selector:
matchLabels:
app: {{ .Release.Name }}
name: "{{ .Values.app.name | default .Chart.Name }}"
{{- if .Values.deployment.labels }}
{{ toYaml .Values.deployment.labels }}
{{- end }}
Expand All @@ -27,7 +28,8 @@ spec:
{{ toYaml .Values.deployment.annotations | default "" }}
{{- end }}
labels:
app: {{ .Release.Name }}
app.kubernetes.io/instance: "{{ .Values.app.name | default .Chart.Name }}"
app.kubernetes.io/name: "{{ .Values.app.name | default .Chart.Name }}"
{{- if .Values.deployment.labels }}
{{ toYaml .Values.deployment.labels }}
{{- end }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,20 @@ tests:
deployment.labels.label1: label2
asserts:
- equal:
path: metadata.labels.app
value: RELEASE-NAME
path: spec.selector.matchLabels.name
value: aissemble-thrift-server-chart
- equal:
path: spec.template.metadata.labels.app
value: RELEASE-NAME
path: metadata.labels["app.kubernetes.io/instance"]
value: aissemble-thrift-server-chart
- equal:
path: spec.selector.matchLabels.app
value: RELEASE-NAME
path: metadata.labels["app.kubernetes.io/name"]
value: aissemble-thrift-server-chart
- equal:
path: spec.template.metadata.labels["app.kubernetes.io/instance"]
value: aissemble-thrift-server-chart
- equal:
path: spec.template.metadata.labels["app.kubernetes.io/name"]
value: aissemble-thrift-server-chart

- it: Should apply requested annotations
set:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# This file contains the default values for the aiSSEMBLE Thrift Service Helm chart.

app:
# Sets labels for app.kubernetes.io/name Default is Chart.Name (aissemble-thrift-server-chart)
name: ''

enable: true

deployment:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
# GENERATED DOCKERFILE - please ***DO*** modify.
#
# Generated from: ${templateName}
ARG DOCKER_BASELINE_REPO_ID
FROM openjdk:11-slim
FROM openjdk:17-jdk-slim

COPY ./target/specifications/ ./specifications
COPY ./target/${artifactId}.jar ./
Original file line number Diff line number Diff line change
Expand Up @@ -41,22 +41,6 @@ parent_dir + '${parentArtifactId}-deploy/src/main/resources/apps/spark-operator/
)
k8s_yaml(yaml)


# Hive Metastore DB
yaml = helm(
parent_dir + '${parentArtifactId}-deploy/src/main/resources/apps/hive-metastore-db',
values=[parent_dir + '${parentArtifactId}-deploy/src/main/resources/apps/hive-metastore-db/values.yaml']
)
k8s_yaml(yaml)

# Zookeeper Alert
yaml = helm(
parent_dir + '${parentArtifactId}-deploy/src/main/resources/apps/zookeeper-alert',
values=[parent_dir + '${parentArtifactId}-deploy/src/main/resources/apps/zookeeper-alert/values.yaml',
parent_dir + '${parentArtifactId}-deploy/src/main/resources/apps/zookeeper-alert/values-dev.yaml']
)
k8s_yaml(yaml)

# Kafka
yaml = helm(
parent_dir + '${parentArtifactId}-deploy/src/main/resources/apps/kafka-cluster',
Expand All @@ -67,7 +51,7 @@ k8s_yaml(yaml)

# Policy Decision Point
docker_build(
ref='boozallen/${parentArtifactId}-policy-decision-point-docker',
ref='${parentArtifactId}-policy-decision-point-docker',
context=parent_dir + '${parentArtifactId}-docker/${parentArtifactId}-policy-decision-point-docker',
build_args=build_args,
dockerfile=parent_dir + '${parentArtifactId}-docker/${parentArtifactId}-policy-decision-point-docker/src/main/resources/docker/Dockerfile'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ deployment:
- name: wait-for-spark-operator
image: busybox:latest
command: [ "/bin/sh","-c" ]
args: [ "until nc -vz spark-operator-webhook.default 443; do sleep 5; echo 'waiting for spark operator...'; done" ]
args: [ "until nc -vz spark-operator-webhook-svc.default 443; do sleep 5; echo 'waiting for spark operator...'; done" ]

0 comments on commit d30b9e8

Please sign in to comment.