Skip to content

Commit

Permalink
fix(#4948): Move handling of IntegrationPlatformResource to a separat…
Browse files Browse the repository at this point in the history
…e operator

Add platformcontroller deployment to helm chart release.
  • Loading branch information
rinaldodev authored and valdar committed Jan 31, 2024
1 parent be91cf6 commit 5be3431
Showing 1 changed file with 111 additions and 0 deletions.
111 changes: 111 additions & 0 deletions helm/camel-k/templates/platformcontroller.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
# ---------------------------------------------------------------------------
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ---------------------------------------------------------------------------

apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: camel-k
camel.apache.org/component: operator
{{- include "camel-k.labels" . | nindent 4 }}
{{- with .Values.operator.annotations }}
annotations:
{{ toYaml . | nindent 4 }}
{{- end }}
name: camel-k-platformcontroller
spec:
replicas: 1
selector:
matchLabels:
name: camel-k-platformcontroller
strategy:
type: Recreate
template:
metadata:
labels:
app: camel-k
camel.apache.org/component: operator
name: camel-k-platformcontroller
spec:
{{- if .Values.operator.imagePullSecrets }}
imagePullSecrets:
{{ toYaml .Values.operator.imagePullSecrets | indent 8 }}
{{- end }}

containers:
- command:
- kamel
- platformcontroller
env:
- name: WATCH_NAMESPACE
{{- if eq .Values.operator.global "false" }}
valueFrom:
fieldRef:
fieldPath: metadata.namespace
{{- else }}
value: ""
{{- end }}
- name: LOG_LEVEL
value: {{ .Values.operator.logLevel }}
- name: OPERATOR_NAME
value: camel-k-platformcontroller
- name: POD_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
- name: NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: KAMEL_OPERATOR_ID
value: {{ .Values.operator.operatorId }}
image: {{ .Values.operator.image }}
imagePullPolicy: IfNotPresent
livenessProbe:
httpGet:
path: /healthz
port: 8081
initialDelaySeconds: 20
periodSeconds: 10
name: camel-k-platformcontroller
ports:
- containerPort: 8080
name: metrics
{{- with .Values.operator.resources }}
resources:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- if .Values.operator.securityContext }}
{{- with .Values.operator.securityContext }}
securityContext:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- else }}
securityContext:
runAsNonRoot: true
seccompProfile:
type: RuntimeDefault
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
{{- end }}
serviceAccountName: camel-k-operator
{{- with .Values.operator.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}

0 comments on commit 5be3431

Please sign in to comment.