Skip to content

feat: Add Service on top of operators #534

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,12 @@ spec:
valueFrom:
fieldRef:
fieldPath: metadata.annotations['internal.stackable.tech/image']
- name: OPERATOR_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: OPERATOR_SERVICE_NAME
value: {{ include "operator.fullname" . }}
{{- if .Values.kubernetesClusterDomain }}
- name: KUBERNETES_CLUSTER_DOMAIN
value: {{ .Values.kubernetesClusterDomain | quote }}
Expand Down
19 changes: 19 additions & 0 deletions template/deploy/helm/[[operator]]/templates/service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@

---
apiVersion: v1
kind: Service
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" . }}
labels:
{{- include "operator.labels" . | nindent 4 }}
spec:
selector:
{{- include "operator.selectorLabels" . | nindent 6 }}
ports:
- name: conversion-webhook
protocol: TCP
port: 8443
targetPort: 8443