1
0
forked from suse-edge/Factory

Import first batch of Edge 3.1 packages

Signed-off-by: Nicolas Belouin <nicolas.belouin@suse.com>
This commit is contained in:
2024-10-17 14:11:42 +02:00
parent fdcd84b482
commit 18bd432874
107 changed files with 5810 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
#!BuildTag: endpoint-copier-operator-chart:0.2.0
#!BuildTag: endpoint-copier-operator-chart:0.2.0-%RELEASE%
apiVersion: v2
name: endpoint-copier-operator
description: A Helm chart for Kubernetes
# A chart can be either an 'application' or a 'library' chart.
#
# Application charts are a collection of templates that can be packaged into versioned archives
# to be deployed.
#
# Library charts provide useful utilities or functions for the chart developer. They're included as
# a dependency of application charts to inject those utilities and functions into the rendering
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.2.0
# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "v0.2.0"

View File

@@ -0,0 +1,8 @@
<services>
<service mode="buildtime" name="kiwi_metainfo_helper"/>
<service name="replace_using_env" mode="buildtime">
<param name="file">values.yaml</param>
<param name="eval">IMG_REPO=$(rpm --macros=/root/.rpmmacros -E %img_repo)</param>
<param name="var">IMG_REPO</param>
</service>
</services>

View File

@@ -0,0 +1,62 @@
{{/*
Expand the name of the chart.
*/}}
{{- define "endpoint-copier-operator.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
{{- end }}
{{/*
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 "endpoint-copier-operator.fullname" -}}
{{- if .Values.fullnameOverride }}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
{{- else }}
{{- $name := default .Chart.Name .Values.nameOverride }}
{{- if contains $name .Release.Name }}
{{- .Release.Name | trunc 63 | trimSuffix "-" }}
{{- else }}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
{{- end }}
{{- end }}
{{- end }}
{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "endpoint-copier-operator.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
{{- end }}
{{/*
Common labels
*/}}
{{- define "endpoint-copier-operator.labels" -}}
helm.sh/chart: {{ include "endpoint-copier-operator.chart" . }}
{{ include "endpoint-copier-operator.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end }}
{{/*
Selector labels
*/}}
{{- define "endpoint-copier-operator.selectorLabels" -}}
app.kubernetes.io/name: {{ include "endpoint-copier-operator.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}
{{/*
Create the name of the service account to use
*/}}
{{- define "endpoint-copier-operator.serviceAccountName" -}}
{{- if .Values.serviceAccount.create }}
{{- default (include "endpoint-copier-operator.fullname" .) .Values.serviceAccount.name }}
{{- else }}
{{- default "default" .Values.serviceAccount.name }}
{{- end }}
{{- end }}

View File

@@ -0,0 +1,49 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "endpoint-copier-operator.fullname" . }}
labels:
{{- include "endpoint-copier-operator.labels" . | nindent 4 }}
spec:
selector:
matchLabels:
{{- include "endpoint-copier-operator.selectorLabels" . | nindent 6 }}
{{- if not .Values.autoscaling.enabled }}
replicas: {{ .Values.replicaCount }}
{{- end }}
template:
metadata:
{{- with .Values.podAnnotations }}
annotations:
{{- toYaml . | nindent 8 }}
{{- end }}
labels:
{{- include "endpoint-copier-operator.selectorLabels" . | nindent 8 }}
spec:
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
containers:
- command:
- /manager
args:
- --leader-elect
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
name: manager
securityContext:
{{- toYaml .Values.securityContext | nindent 10 }}
livenessProbe:
httpGet:
path: /healthz
port: 8081
initialDelaySeconds: 15
periodSeconds: 20
readinessProbe:
httpGet:
path: /readyz
port: 8081
initialDelaySeconds: 5
periodSeconds: 10
resources:
{{- toYaml .Values.resources | nindent 10 }}
serviceAccountName: {{ include "endpoint-copier-operator.serviceAccountName" . }}
terminationGracePeriodSeconds: 10

View File

@@ -0,0 +1,9 @@
apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
name: {{ include "endpoint-copier-operator.fullname" . }}
spec:
maxUnavailable: 1
selector:
matchLabels:
{{- include "endpoint-copier-operator.selectorLabels" . | nindent 6 }}

View File

@@ -0,0 +1,39 @@
# permissions to do leader election.
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
labels:
{{- include "endpoint-copier-operator.labels" . | nindent 4 }}
name: {{ include "endpoint-copier-operator.fullname" . }}-leader-election
rules:
- apiGroups:
- ""
resources:
- configmaps
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- coordination.k8s.io
resources:
- leases
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- ""
resources:
- events
verbs:
- create
- patch

View File

@@ -0,0 +1,14 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
labels:
{{- include "endpoint-copier-operator.labels" . | nindent 4 }}
name: {{ include "endpoint-copier-operator.fullname" . }}-leader-election
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: {{ include "endpoint-copier-operator.fullname" . }}-leader-election
subjects:
- kind: ServiceAccount
name: {{ include "endpoint-copier-operator.fullname" . }}
namespace: {{ .Release.Namespace }}

View File

@@ -0,0 +1,42 @@
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
labels:
{{- include "endpoint-copier-operator.labels" . | nindent 4 }}
name: {{ include "endpoint-copier-operator.fullname" . }}
rules:
- apiGroups:
- ""
resources:
- endpoints
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- ""
resources:
- endpoints/finalizers
verbs:
- update
- apiGroups:
- ""
resources:
- endpoints/status
verbs:
- get
- patch
- update
- apiGroups:
- ""
resources:
- services
verbs:
- get
- list
- watch

View File

@@ -0,0 +1,14 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
labels:
{{- include "endpoint-copier-operator.labels" . | nindent 4 }}
name: {{ include "endpoint-copier-operator.fullname" . }}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: {{ include "endpoint-copier-operator.fullname" . }}
subjects:
- kind: ServiceAccount
name: {{ include "endpoint-copier-operator.fullname" . }}
namespace: {{ .Release.Namespace }}

View File

@@ -0,0 +1,12 @@
{{- if .Values.serviceAccount.create -}}
apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ include "endpoint-copier-operator.serviceAccountName" . }}
labels:
{{- include "endpoint-copier-operator.labels" . | nindent 4 }}
{{- with .Values.serviceAccount.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
{{- end }}

View File

@@ -0,0 +1,44 @@
# Default values for endpoint-copier-operator.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
replicaCount: 2
image:
repository: "%%IMG_REPO%%/endpoint-copier-operator"
pullPolicy: IfNotPresent
# Overrides the image tag whose default is the chart appVersion.
tag: ""
nameOverride: "endpoint-copier-operator"
fullnameOverride: "endpoint-copier-operator"
serviceAccount:
# Specifies whether a service account should be created
create: true
# Annotations to add to the service account
annotations: {}
# The name of the service account to use.
# If not set and create is true, a name is generated using the fullname template
name: "endpoint-copier-operator"
podAnnotations: {}
podSecurityContext:
runAsNonRoot: true
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- "ALL"
resources:
limits:
cpu: 500m
memory: 128Mi
requests:
cpu: 10m
memory: 64Mi
autoscaling:
enabled: false
minReplicas: 1
maxReplicas: 100
targetCPUUtilizationPercentage: 80
# targetMemoryUtilizationPercentage: 80
nodeSelector: {}
tolerations: []
affinity: {}