moved charts
All checks were successful
Lint and Test Charts / lint-test (push) Successful in 20s
Testing pipes / Explore-Gitea-Actions (push) Successful in 33s

This commit is contained in:
Jonas Forsberg
2024-10-15 12:32:56 +02:00
parent 8fc6320af3
commit f2b8cf31ca
10 changed files with 0 additions and 0 deletions

View File

@@ -1,24 +0,0 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
*.tgz
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*.orig
*~
# Various IDEs
.project
.idea/
*.tmproj
.vscode/

View File

@@ -1,24 +0,0 @@
apiVersion: v2
name: azure-agent
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.4.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: "0.7"

View File

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

View File

@@ -1,9 +0,0 @@
apiVersion: v1
stringData:
AZP_POOL: {{ .Values.azure.pool }}
AZP_TOKEN: {{ .Values.azure.token }}
AZP_URL: {{ .Values.azure.url }}
kind: Secret
metadata:
name: {{ include "az-agent.fullname" . }}
type: Opaque

View File

@@ -1,92 +0,0 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "az-agent.fullname" . }}
labels:
{{- include "az-agent.labels" . | nindent 4 }}
spec:
replicas: {{ .Values.replicaCount }}
selector:
matchLabels:
{{- include "az-agent.selectorLabels" . | nindent 6 }}
template:
metadata:
{{- with .Values.podAnnotations }}
annotations:
{{- toYaml . | nindent 8 }}
{{- end }}
labels:
{{- include "az-agent.labels" . | nindent 8 }}
{{- with .Values.podLabels }}
{{- toYaml . | nindent 8 }}
{{- end }}
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
serviceAccountName: {{ include "az-agent.serviceAccountName" . }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
containers:
- name: {{ .Chart.Name }}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
env:
- name: AZP_URL
valueFrom:
secretKeyRef:
name: {{ include "az-agent.fullname" . }}
key: AZP_URL
- name: AZP_POOL
valueFrom:
secretKeyRef:
name: {{ include "az-agent.fullname" . }}
key: AZP_POOL
- name: HARBOR_USERNAME
valueFrom:
secretKeyRef:
name: {{ include "az-agent.fullname" . }}-harbor
key: HARBOR_USERNAME
- name: HARBOR_PASSWORD
valueFrom:
secretKeyRef:
name: {{ include "az-agent.fullname" . }}-harbor
key: HARBOR_PASSWORD
- name: HARBOR_HOST
valueFrom:
secretKeyRef:
name: {{ include "az-agent.fullname" . }}-harbor
key: HARBOR_HOST
- name: HARBOR_PORT
valueFrom:
secretKeyRef:
name: {{ include "az-agent.fullname" . }}-harbor
key: HARBOR_PORT
volumeMounts:
- name: azp-token
mountPath: /home/agent/.token
subPath: .token
readOnly: true
volumes:
- name: azp-token
secret:
secretName: {{ include "az-agent.fullname" . }}
items:
- key: AZP_TOKEN
path: .token
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}

View File

@@ -1,10 +0,0 @@
apiVersion: v1
stringData:
HARBOR_USERNAME: {{ .Values.harbor.username }}
HARBOR_PASSWORD: {{ .Values.harbor.password }}
HARBOR_HOST: {{ .Values.harbor.host }}
HARBOR_PORT: "{{ .Values.harbor.port }}"
kind: Secret
metadata:
name: {{ include "az-agent.fullname" . }}-harbor
type: Opaque

View File

@@ -1,6 +0,0 @@
{{- $_ := required "azure.url is required" .Values.azure.url }}
{{- $_ := required "azure.pool is required" .Values.azure.pool }}
{{- $_ := required "azure.token is required" .Values.azure.token }}
{{- $_ := required "harbor.username is required" .Values.harbor.username }}
{{- $_ := required "harbor.password is required" .Values.harbor.password }}
{{- $_ := required "harbor.host is required" .Values.harbor.host }}

View File

@@ -1,20 +0,0 @@
{{- $sa_namespace := .Release.Namespace -}}
{{- $object_name := include "az-agent.serviceAccountName" . -}}
{{- $labels := include "az-agent.labels" . | nindent 4 -}}
{{- range .Values.build.namespaces }}
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: {{ $object_name }}
namespace: {{ . }}
labels: {{ $labels }}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: cluster-admin
subjects:
- kind: ServiceAccount
name: {{ $object_name }}
namespace: {{ $sa_namespace }}
{{ end }}

View File

@@ -1,13 +0,0 @@
{{- if .Values.serviceAccount.create -}}
apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ include "az-agent.serviceAccountName" . }}
labels:
{{- include "az-agent.labels" . | nindent 4 }}
{{- with .Values.serviceAccount.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
automountServiceAccountToken: {{ .Values.serviceAccount.automount }}
{{- end }}

View File

@@ -1,73 +0,0 @@
# Default values for az-agent.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
azure:
url
pool
token:
harbor:
username:
password:
host:
port: 5000
build:
namespaces:
- adss
- azure-agents
replicaCount: 1
image:
repository: library/azure-agent
pullPolicy: IfNotPresent
# Overrides the image tag whose default is the chart appVersion.
tag: ""
imagePullSecrets: []
nameOverride: ""
fullnameOverride: ""
serviceAccount:
create: true
automount: true
annotations: {}
name: ""
podAnnotations: {}
podLabels: {}
podSecurityContext: {}
# fsGroup: 2000
securityContext:
# capabilities:
# drop:
# - ALL
# readOnlyRootFilesystem: true
# runAsNonRoot: true
# runAsUser: 1000
privileged: true
capabilities:
add:
- "SYS_ADMIN"
resources: {}
# We usually recommend not to specify default resources and to leave this as a conscious
# choice for the user. This also increases chances charts run on environments with little
# resources, such as Minikube. If you do want to specify resources, uncomment the following
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
# limits:
# cpu: 100m
# memory: 128Mi
# requests:
# cpu: 100m
# memory: 128Mi
nodeSelector: {}
tolerations: []
affinity: {}