Skip to content
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 .github/workflows/integration-test-profile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
PROFILE_INPUT: ${{ inputs.test-profile }}
shell: bash
run: |
if [ "$EVENT_NAME" == "schedule" ]; then
if [ "$GITHUB_EVENT_NAME" == "schedule" ]; then
echo "PROFILE=schedule" | tee -a "$GITHUB_OUTPUT"
else
echo "PROFILE=${PROFILE_INPUT}" | tee -a "$GITHUB_OUTPUT"
Expand Down
28 changes: 14 additions & 14 deletions deploy/helm/trino-operator/templates/_helpers.tpl
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{{/*
Expand the name of the chart.
*/}}
{{- define "operator.name" -}}
{{- define "trino-operator.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-operator" }}
{{- end }}

{{/*
Expand the name of the chart.
*/}}
{{- define "operator.appname" -}}
{{- define "trino-operator.appname" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
{{- end }}

Expand All @@ -17,7 +17,7 @@ Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
If release name contains chart name it will be used as a full name.
*/}}
{{- define "operator.fullname" -}}
{{- define "trino-operator.fullname" -}}
{{- if .Values.fullnameOverride }}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
{{- else }}
Expand All @@ -33,16 +33,16 @@ If release name contains chart name it will be used as a full name.
{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "operator.chart" -}}
{{- define "trino-operator.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
{{- end }}

{{/*
Common labels
*/}}
{{- define "operator.labels" -}}
helm.sh/chart: {{ include "operator.chart" . }}
{{ include "operator.selectorLabels" . }}
{{- define "trino-operator.labels" -}}
helm.sh/chart: {{ include "trino-operator.chart" . }}
{{ include "trino-operator.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
Expand All @@ -52,8 +52,8 @@ app.kubernetes.io/managed-by: {{ .Release.Service }}
{{/*
Selector labels
*/}}
{{- define "operator.selectorLabels" -}}
app.kubernetes.io/name: {{ include "operator.appname" . }}
{{- define "trino-operator.selectorLabels" -}}
app.kubernetes.io/name: {{ include "trino-operator.appname" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- with .Values.labels }}
{{ toYaml . }}
Expand All @@ -63,9 +63,9 @@ app.kubernetes.io/instance: {{ .Release.Name }}
{{/*
Create the name of the service account to use
*/}}
{{- define "operator.serviceAccountName" -}}
{{- define "trino-operator.serviceAccountName" -}}
{{- if .Values.serviceAccount.create }}
{{- default (printf "%s-serviceaccount" (include "operator.fullname" .)) .Values.serviceAccount.name }}
{{- default (printf "%s-serviceaccount" (include "trino-operator.fullname" .)) .Values.serviceAccount.name }}
{{- else }}
{{- required "serviceAccount.name is required when serviceAccount.create is false, because the chart then does not create a ServiceAccount for the operator to run as." .Values.serviceAccount.name }}
{{- end }}
Expand All @@ -74,13 +74,13 @@ Create the name of the service account to use
{{/*
Labels for Kubernetes objects created by helm test
*/}}
{{- define "operator.testLabels" -}}
helm.sh/test: {{ include "operator.chart" . }}
{{- define "trino-operator.testLabels" -}}
helm.sh/test: {{ include "trino-operator.chart" . }}
{{- end }}

{{/*
Build the full operator container image reference.
*/}}
{{- define "operator.image" -}}
{{- define "trino-operator.image" -}}
{{- printf "%s/%s:%s" .Values.image.repository .Chart.Name (.Values.image.tag | default .Chart.AppVersion) -}}
{{- end }}
2 changes: 1 addition & 1 deletion deploy/helm/trino-operator/templates/_maintenance.tpl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{{/*
Create a list of maintenance related env vars.
*/}}
{{- define "maintenance.envVars" -}}
{{- define "trino-operator.maintenance.envVars" -}}
{{- with .Values.maintenance }}
{{- if not .endOfSupportCheck.enabled }}
- name: EOS_DISABLED
Expand Down
4 changes: 2 additions & 2 deletions deploy/helm/trino-operator/templates/_telemetry.tpl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{{/*
Create a list of telemetry related env vars.
*/}}
{{- define "telemetry.envVars" -}}
{{- define "trino-operator.telemetry.envVars" -}}
{{- with .Values.telemetry }}
{{- if not .consoleLog.enabled }}
- name: CONSOLE_LOG_DISABLED
Expand All @@ -17,7 +17,7 @@ Create a list of telemetry related env vars.
{{ end }}
{{- if .fileLog.enabled }}
- name: FILE_LOG_DIRECTORY
value: /stackable/logs/{{ include "operator.appname" $ }}
value: /stackable/logs/{{ include "trino-operator.appname" $ }}
{{- end }}
{{- if and .fileLog.enabled .fileLog.level }}
- name: FILE_LOG_LEVEL
Expand Down
14 changes: 7 additions & 7 deletions deploy/helm/trino-operator/templates/clusterrole-operator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: {{ include "operator.fullname" . }}-clusterrole
name: {{ include "trino-operator.fullname" . }}-clusterrole
labels:
{{- include "operator.labels" . | nindent 4 }}
{{- include "trino-operator.labels" . | nindent 4 }}
rules:
# For automatic cluster domain detection
- apiGroups:
Expand Down Expand Up @@ -64,7 +64,7 @@ rules:
verbs:
- bind
resourceNames:
- {{ include "operator.name" . }}-clusterrole
- {{ include "trino-operator.name" . }}-clusterrole
# StatefulSet created per role group. Applied via SSA, tracked for orphan cleanup, and
# owned by the controller.
- apiGroups:
Expand Down Expand Up @@ -130,18 +130,18 @@ rules:
- patch
# Primary CRD: watched by the controller and read during reconciliation.
- apiGroups:
- {{ include "operator.name" . }}.stackable.tech
- {{ include "trino-operator.name" . }}.stackable.tech
resources:
- {{ include "operator.name" . }}clusters
- {{ include "trino-operator.name" . }}clusters
verbs:
- get
- list
- watch
# Status subresource: updated at the end of every reconciliation.
- apiGroups:
- {{ include "operator.name" . }}.stackable.tech
- {{ include "trino-operator.name" . }}.stackable.tech
resources:
- {{ include "operator.name" . }}clusters/status
- {{ include "trino-operator.name" . }}clusters/status
verbs:
- patch
# Read S3 connection configuration referenced in catalog definitions.
Expand Down
4 changes: 2 additions & 2 deletions deploy/helm/trino-operator/templates/clusterrole-product.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: {{ include "operator.name" . }}-clusterrole
name: {{ include "trino-operator.name" . }}-clusterrole
labels:
{{- include "operator.labels" . | nindent 4 }}
{{- include "trino-operator.labels" . | nindent 4 }}
rules:
{{ if .Capabilities.APIVersions.Has "security.openshift.io/v1" }}
# Required on OpenShift to allow the Trino pods to run as a non-root user.
Expand Down
22 changes: 11 additions & 11 deletions deploy/helm/trino-operator/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,41 +2,41 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "operator.fullname" . }}-deployment
name: {{ include "trino-operator.fullname" . }}-deployment
labels:
{{- include "operator.labels" . | nindent 4 }}
{{- include "trino-operator.labels" . | nindent 4 }}
spec:
replicas: 1
strategy:
type: Recreate
selector:
matchLabels:
{{- include "operator.selectorLabels" . | nindent 6 }}
{{- include "trino-operator.selectorLabels" . | nindent 6 }}
template:
metadata:
annotations:
internal.stackable.tech/image: {{ include "operator.image" . }}
internal.stackable.tech/image: {{ include "trino-operator.image" . }}
{{- with .Values.podAnnotations }}
{{- toYaml . | nindent 8 }}
{{- end }}
labels:
{{- if .Values.maintenance.customResourceDefinitions.maintain }}
webhook.stackable.tech/conversion: enabled
{{- end }}
{{- include "operator.selectorLabels" . | nindent 8 }}
{{- include "trino-operator.selectorLabels" . | nindent 8 }}
spec:
{{- with .Values.image.pullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
serviceAccountName: {{ include "operator.serviceAccountName" . }}
serviceAccountName: {{ include "trino-operator.serviceAccountName" . }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
containers:
- name: {{ include "operator.appname" . }}
- name: {{ include "trino-operator.appname" . }}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
image: {{ include "operator.image" . }}
image: {{ include "trino-operator.image" . }}
imagePullPolicy: {{ .Values.image.pullPolicy }}
resources:
{{- toYaml .Values.resources | nindent 12 }}
Expand Down Expand Up @@ -64,7 +64,7 @@ spec:
# The name of the Kubernetes Service that point to the operator Pod, e.g. used to
# construct the conversion webhook endpoint.
- name: OPERATOR_SERVICE_NAME
value: {{ include "operator.fullname" . }}
value: {{ include "trino-operator.fullname" . }}

# The product image repository, like "oci.stackable.tech/sdp".
- name: IMAGE_REPOSITORY
Expand All @@ -82,8 +82,8 @@ spec:
value: {{ .Values.kubernetesClusterDomain | quote }}
{{- end }}

{{- include "telemetry.envVars" . | nindent 12 }}
{{- include "maintenance.envVars" . | nindent 12 }}
{{- include "trino-operator.telemetry.envVars" . | nindent 12 }}
{{- include "trino-operator.maintenance.envVars" . | nindent 12 }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
Expand Down
6 changes: 3 additions & 3 deletions deploy/helm/trino-operator/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ metadata:
# Note(@sbernauer): We could also call the Service something like
# "product-operator-conversion-webhook". However, in the future we will have more webhooks, and
# it seems like an overkill to have a dedicated Service per webhook.
name: {{ include "operator.fullname" . }}
name: {{ include "trino-operator.fullname" . }}
labels:
{{- include "operator.labels" . | nindent 4 }}
{{- include "trino-operator.labels" . | nindent 4 }}
spec:
selector:
{{- if .Values.maintenance.customResourceDefinitions.maintain }}
webhook.stackable.tech/conversion: enabled
{{- end }}
{{- include "operator.selectorLabels" . | nindent 4 }}
{{- include "trino-operator.selectorLabels" . | nindent 4 }}
ports:
- name: conversion-webhook
protocol: TCP
Expand Down
12 changes: 6 additions & 6 deletions deploy/helm/trino-operator/templates/serviceaccount.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ include "operator.serviceAccountName" . }}
name: {{ include "trino-operator.serviceAccountName" . }}
labels:
{{- include "operator.labels" . | nindent 4 }}
{{- include "trino-operator.labels" . | nindent 4 }}
{{- with .Values.serviceAccount.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
Expand All @@ -17,14 +17,14 @@ apiVersion: rbac.authorization.k8s.io/v1
# operator watch and manage its custom resources across the cluster.
kind: ClusterRoleBinding
metadata:
name: {{ include "operator.fullname" . }}-clusterrolebinding
name: {{ include "trino-operator.fullname" . }}-clusterrolebinding
labels:
{{- include "operator.labels" . | nindent 4 }}
{{- include "trino-operator.labels" . | nindent 4 }}
subjects:
- kind: ServiceAccount
name: {{ include "operator.serviceAccountName" . }}
name: {{ include "trino-operator.serviceAccountName" . }}
namespace: {{ .Release.Namespace }}
roleRef:
kind: ClusterRole
name: {{ include "operator.fullname" . }}-clusterrole
name: {{ include "trino-operator.fullname" . }}-clusterrole
apiGroup: rbac.authorization.k8s.io
Loading