Skip to content
Snippets Groups Projects
Commit 776ef61d authored by Sjoerd Simons's avatar Sjoerd Simons
Browse files

Merge branch 'wip/refi64/publish-perf-cofork' into 'collabora/staging'

publish performance fixes & moving build infra from aptly-repository

See merge request !5
parents 783c1163 a782df41
No related branches found
No related tags found
1 merge request!5publish performance fixes & moving build infra from aptly-repository
Pipeline #85552 passed
Showing
with 699 additions and 10 deletions
stages:
- docker
- tag
variables:
TAG_SHA: $CI_COMMIT_SHORT_SHA-P$CI_PIPELINE_ID
GIT_SUBMODULE_STRATEGY: recursive
APTLY_DEBUG: 'false'
aptly-image:
stage: docker
tags:
- lightweight
image:
name: gcr.io/kaniko-project/executor:debug
entrypoint: [""]
script:
- |
cat << EOF > /kaniko/.docker/config.json
{
"auths":{
"$CI_REGISTRY": {
"username":"$CI_REGISTRY_USER",
"password":"$CI_REGISTRY_PASSWORD"
}
}
}
EOF
- >
/kaniko/executor
--context $CI_PROJECT_DIR
--dockerfile $CI_PROJECT_DIR/docker/Dockerfile
--destination $CI_REGISTRY_IMAGE:$TAG_SHA
--destination $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG
--build-arg REGISTRY=$CI_REGISTRY_IMAGE
--build-arg TAG=$CI_COMMIT_REF_SLUG
--build-arg APTLY_DEBUG=$APTLY_DEBUG
--single-snapshot
- echo Pushed $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG
and $CI_REGISTRY_IMAGE:$TAG_SHA
......@@ -6,8 +6,10 @@ import (
"os"
"path/filepath"
"strings"
"sync"
"github.com/gin-gonic/gin"
"github.com/saracen/walker"
)
func verifyPath(path string) bool {
......@@ -34,17 +36,16 @@ func verifyDir(c *gin.Context) bool {
// GET /files
func apiFilesListDirs(c *gin.Context) {
list := []string{}
listLock := &sync.Mutex{}
err := filepath.Walk(context.UploadPath(), func(path string, info os.FileInfo, err error) error {
if err != nil {
return err
}
err := walker.Walk(context.UploadPath(), func(path string, info os.FileInfo) error {
if path == context.UploadPath() {
return nil
}
if info.IsDir() {
listLock.Lock()
defer listLock.Unlock()
list = append(list, filepath.Base(path))
return filepath.SkipDir
}
......@@ -121,17 +122,16 @@ func apiFilesListFiles(c *gin.Context) {
}
list := []string{}
listLock := &sync.Mutex{}
root := filepath.Join(context.UploadPath(), c.Params.ByName("dir"))
err := filepath.Walk(root, func(path string, info os.FileInfo, err error) error {
if err != nil {
return err
}
err := walker.Walk(root, func(path string, info os.FileInfo) error {
if path == root {
return nil
}
listLock.Lock()
defer listLock.Unlock()
list = append(list, filepath.Base(path))
return nil
......
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.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/
apiVersion: v2
name: aptly
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.1.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: "1.16.0"
1. Get the application URL by running these commands:
{{- if .Values.ingress.enabled }}
{{- range $host := .Values.ingress.hosts }}
{{- range .paths }}
http{{ if $.Values.ingress.tls }}s{{ end }}://{{ $host.host }}{{ .path }}
{{- end }}
{{- end }}
{{- else if contains "NodePort" .Values.service.type }}
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "aptly.fullname" . }})
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
echo http://$NODE_IP:$NODE_PORT
{{- else if contains "LoadBalancer" .Values.service.type }}
NOTE: It may take a few minutes for the LoadBalancer IP to be available.
You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "aptly.fullname" . }}'
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "aptly.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}")
echo http://$SERVICE_IP:{{ .Values.service.port }}
{{- else if contains "ClusterIP" .Values.service.type }}
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "aptly.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
export CONTAINER_PORT=$(kubectl get pod --namespace {{ .Release.Namespace }} $POD_NAME -o jsonpath="{.spec.containers[0].ports[0].containerPort}")
echo "Visit http://127.0.0.1:8080 to use your application"
kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:$CONTAINER_PORT
{{- end }}
{{/*
Expand the name of the chart.
*/}}
{{- define "aptly.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 "aptly.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 "aptly.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
{{- end }}
{{/*
Common labels
*/}}
{{- define "aptly.labels" -}}
helm.sh/chart: {{ include "aptly.chart" . }}
{{ include "aptly.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end }}
{{/*
Selector labels
*/}}
{{- define "aptly.selectorLabels" -}}
app.kubernetes.io/name: {{ include "aptly.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}
{{/*
Extra selector labels for the main aptly pod
*/}}
{{- define "aptly.extraPodSelectorLabels" -}}
service: aptly
{{- end }}
{{/*
Extra selector labels for the aptly-latest-snapshots pod
*/}}
{{- define "aptly.latestSnapshots.extraPodSelectorLabels" -}}
service: aptly-latest-snapshots
{{- end }}
{{/*
Create the name of the service account to use
*/}}
{{- define "aptly.serviceAccountName" -}}
{{- if .Values.serviceAccount.create }}
{{- default (include "aptly.fullname" .) .Values.serviceAccount.name }}
{{- else }}
{{- default "default" .Values.serviceAccount.name }}
{{- end }}
{{- end }}
{{/*
Create the name of the configuration secret
*/}}
{{- define "aptly.configSecretName" -}}
{{ include "aptly.name" . }}-config
{{- end }}
{{/*
Create the name of the GPG keys secret
*/}}
{{- define "aptly.gpgSecretName" -}}
{{ include "aptly.name" . }}-gpg
{{- end }}
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "aptly.fullname" . }}-publish
labels:
{{- include "aptly.labels" . | nindent 4 }}
data:
default.conf: |
server {
listen 80 default_server;
listen [::]:80 default_server;
#access_log /var/log/nginx/host.access.log main;
location ~ /apertis/dists/(?<dist>[^/]+)/snapshots/latest\.txt$ {
resolver kube-dns.kube-system.svc.cluster.local;
proxy_pass http://{{ include "aptly.fullname" . }}-latest-snapshots.{{ .Release.Namespace }}.svc.cluster.local:{{ .Values.latestSnapshots.service.port }}/latest/$dist;
}
location / {
root /data;
autoindex on;
try_files $uri $uri/ =404;
}
}
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "aptly.fullname" . }}-latest-snapshots
labels:
{{- include "aptly.labels" . | nindent 4 }}
spec:
{{- if not .Values.autoscaling.enabled }}
replicas: {{ .Values.replicaCount }}
{{- end }}
selector:
matchLabels:
{{- include "aptly.selectorLabels" . | nindent 6 }}
{{- include "aptly.latestSnapshots.extraPodSelectorLabels" . | nindent 6 }}
template:
metadata:
{{- with .Values.podAnnotations }}
annotations:
{{- toYaml . | nindent 8 }}
{{- end }}
labels:
{{- include "aptly.selectorLabels" . | nindent 8 }}
{{- include "aptly.latestSnapshots.extraPodSelectorLabels" . | nindent 8 }}
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
serviceAccountName: {{ include "aptly.serviceAccountName" . }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
containers:
- name: {{ .Chart.Name }}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
image: "{{ .Values.latestSnapshots.image.repository }}:{{ .Values.latestSnapshots.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.latestSnapshots.image.pullPolicy }}
args:
- --api-url=http://{{ include "aptly.fullname" . }}:8080/
- --refresh-interval-sec={{ .Values.latestSnapshots.refreshIntervalSec }}
ports:
- name: http
containerPort: 8080
protocol: TCP
livenessProbe:
httpGet:
path: /healthz
port: http
readinessProbe:
httpGet:
path: /healthz
port: http
# Grabbing the latest snapshots can take a bit
initialDelaySeconds: 10
resources:
{{- toYaml .Values.latestSnapshots.resources | nindent 12 }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- if .Values.autoscaling.enabled }}
apiVersion: autoscaling/v2beta1
kind: HorizontalPodAutoscaler
metadata:
name: {{ include "aptly.fullname" . }}
labels:
{{- include "aptly.labels" . | nindent 4 }}
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: {{ include "aptly.fullname" . }}
minReplicas: {{ .Values.autoscaling.minReplicas }}
maxReplicas: {{ .Values.autoscaling.maxReplicas }}
metrics:
{{- if .Values.autoscaling.targetCPUUtilizationPercentage }}
- type: Resource
resource:
name: cpu
targetAverageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
{{- end }}
{{- if .Values.autoscaling.targetMemoryUtilizationPercentage }}
- type: Resource
resource:
name: memory
targetAverageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}
{{- end }}
{{- end }}
{{- if .Values.ingressApi.enabled -}}
{{- $fullName := include "aptly.fullname" . -}}
{{- $svcPort := .Values.service.portApi -}}
{{- if and .Values.ingressApi.className (not (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion)) }}
{{- if not (hasKey .Values.ingressApi.annotations "kubernetes.io/ingress.class") }}
{{- $_ := set .Values.ingressApi.annotations "kubernetes.io/ingress.class" .Values.ingressApi.className}}
{{- end }}
{{- end }}
{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}}
apiVersion: networking.k8s.io/v1
{{- else if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}}
apiVersion: networking.k8s.io/v1beta1
{{- else -}}
apiVersion: extensions/v1beta1
{{- end }}
kind: Ingress
metadata:
name: {{ $fullName }}-api
labels:
{{- include "aptly.labels" . | nindent 4 }}
{{- with .Values.ingressApi.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
{{- if and .Values.ingressApi.className (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion) }}
ingressClassName: {{ .Values.ingressApi.className }}
{{- end }}
{{- if .Values.ingressApi.tls }}
tls:
{{- range .Values.ingressApi.tls }}
- hosts:
{{- range .hosts }}
- {{ . | quote }}
{{- end }}
secretName: {{ .secretName }}
{{- end }}
{{- end }}
rules:
{{- range .Values.ingressApi.hosts }}
- host: {{ .host | quote }}
http:
paths:
{{- range .paths }}
- path: {{ .path }}
{{- if and .pathType (semverCompare ">=1.18-0" $.Capabilities.KubeVersion.GitVersion) }}
pathType: {{ .pathType }}
{{- end }}
backend:
{{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }}
service:
name: {{ $fullName }}
port:
number: {{ $svcPort }}
{{- else }}
serviceName: {{ $fullName }}
servicePort: {{ $svcPort }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}
{{- if .Values.ingress.enabled -}}
{{- $fullName := include "aptly.fullname" . -}}
{{- $svcPort := .Values.service.port -}}
{{- if and .Values.ingress.className (not (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion)) }}
{{- if not (hasKey .Values.ingress.annotations "kubernetes.io/ingress.class") }}
{{- $_ := set .Values.ingress.annotations "kubernetes.io/ingress.class" .Values.ingress.className}}
{{- end }}
{{- end }}
{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}}
apiVersion: networking.k8s.io/v1
{{- else if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}}
apiVersion: networking.k8s.io/v1beta1
{{- else -}}
apiVersion: extensions/v1beta1
{{- end }}
kind: Ingress
metadata:
name: {{ $fullName }}
labels:
{{- include "aptly.labels" . | nindent 4 }}
{{- with .Values.ingress.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
{{- if and .Values.ingress.className (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion) }}
ingressClassName: {{ .Values.ingress.className }}
{{- end }}
{{- if .Values.ingress.tls }}
tls:
{{- range .Values.ingress.tls }}
- hosts:
{{- range .hosts }}
- {{ . | quote }}
{{- end }}
secretName: {{ .secretName }}
{{- end }}
{{- end }}
rules:
{{- range .Values.ingress.hosts }}
- host: {{ .host | quote }}
http:
paths:
{{- range .paths }}
- path: {{ .path }}
{{- if and .pathType (semverCompare ">=1.18-0" $.Capabilities.KubeVersion.GitVersion) }}
pathType: {{ .pathType }}
{{- end }}
backend:
{{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }}
service:
name: {{ $fullName }}
port:
number: {{ $svcPort }}
{{- else }}
serviceName: {{ $fullName }}
servicePort: {{ $svcPort }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}
apiVersion: traefik.io/v1alpha1
kind: Middleware
metadata:
name: {{ include "aptly.name" . }}-auth
labels:
{{- include "aptly.labels" . | nindent 4 }}
spec:
forwardAuth:
address: http://oathkeeper-api:4456/decisions
authResponseHeaders:
- Authorization
# basicAuth:
# secret: {{ include "aptly.name" . }}-auth
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: {{ include "aptly.fullname" . }}-data
labels:
{{- include "aptly.labels" . | nindent 4 }}
annotations:
{{- toYaml .Values.persistence.annotations | nindent 14 }}
spec:
accessModes:
{{- toYaml .Values.persistence.accessModes | nindent 14 }}
{{- if .Values.persistence.storageClass }}
storageClassName: {{ .Values.persistence.storageClass | quote }}
{{- end }}
resources:
requests:
storage: {{ .Values.persistence.size | quote }}
{{- $persistencePath := printf "%s/%s" .Values.persistence.mountPath .Values.persistence.subPath | clean }}
{{- if ne (.Values.config.rootDir | clean) ($persistencePath | clean) }}
{{- fail
(printf "config.rootDir (%s) must match persistence $mountPath/$subPath (%s)"
.Values.config.rootDir $persistencePath) }}
{{- end }}
apiVersion: v1
kind: Secret
metadata:
name: {{ include "aptly.configSecretName" . }}
labels:
{{- include "aptly.labels" . | nindent 4 }}
stringData:
aptly.conf: |
{{ .Values.config | mustToPrettyJson | nindent 4 }}
{{- if .Values.gpg.enabled }}
apiVersion: v1
kind: Secret
metadata:
name: {{ include "aptly.gpgSecretName" . }}
labels:
{{- include "aptly.labels" . | nindent 4 }}
stringData:
{{- range $i, $key := .Values.gpg.keys }}
key{{$i}}.asc: |
{{ $key | nindent 4 }}
{{- end }}
{{- end }}
apiVersion: v1
kind: Service
metadata:
name: {{ include "aptly.fullname" . }}-latest-snapshots
labels:
{{- include "aptly.labels" . | nindent 4 }}
spec:
type: {{ .Values.latestSnapshots.service.type }}
ports:
- port: {{ .Values.latestSnapshots.service.port }}
targetPort: http
protocol: TCP
name: http
selector:
{{- include "aptly.selectorLabels" . | nindent 4 }}
{{- include "aptly.latestSnapshots.extraPodSelectorLabels" . | nindent 4 }}
apiVersion: v1
kind: Service
metadata:
name: {{ include "aptly.fullname" . }}
labels:
{{- include "aptly.labels" . | nindent 4 }}
spec:
type: {{ .Values.service.type }}
ports:
- port: {{ .Values.service.port }}
targetPort: http
protocol: TCP
name: http
- port: {{ .Values.service.portApi }}
targetPort: api
protocol: TCP
name: api
selector:
{{- include "aptly.selectorLabels" . | nindent 4 }}
{{- include "aptly.extraPodSelectorLabels" . | nindent 4 }}
{{- if .Values.serviceAccount.create -}}
apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ include "aptly.serviceAccountName" . }}
labels:
{{- include "aptly.labels" . | nindent 4 }}
{{- with .Values.serviceAccount.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
{{- end }}
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: {{ include "aptly.fullname" . }}
labels:
{{- include "aptly.labels" . | nindent 4 }}
spec:
{{- if not .Values.autoscaling.enabled }}
replicas: {{ .Values.replicaCount }}
{{- end }}
serviceName: {{ include "aptly.fullname" . }}
selector:
matchLabels:
{{- include "aptly.selectorLabels" . | nindent 6 }}
{{- include "aptly.extraPodSelectorLabels" . | nindent 6 }}
template:
metadata:
{{- with .Values.podAnnotations }}
annotations:
{{- toYaml . | nindent 8 }}
{{- end }}
labels:
{{- include "aptly.selectorLabels" . | nindent 8 }}
{{- include "aptly.extraPodSelectorLabels" . | nindent 8 }}
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
serviceAccountName: {{ include "aptly.serviceAccountName" . }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
containers:
- name: {{ .Chart.Name }}-api
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
args:
- -config=/aptly/config/aptly.conf
ports:
- name: api
containerPort: 8080
protocol: TCP
livenessProbe:
httpGet:
path: /api/healthy
port: api
readinessProbe:
httpGet:
path: /api/ready
port: api
resources:
{{- toYaml (merge .Values.api.resources .Values.resources) | nindent 12 }}
volumeMounts:
- name: config
mountPath: /aptly/config
- name: data
mountPath: {{ .Values.persistence.mountPath }}
subPath: {{ .Values.persistence.subPath }}
{{- if .Values.gpg.enabled }}
- name: gpg
mountPath: /aptly/gpg
{{- end }}
{{- if .Values.extraVolumeMounts }}
{{- toYaml .Values.extraVolumeMounts | nindent 12 }}
{{- end }}
- name: {{ .Chart.Name }}-publish
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
image: docker.io/library/nginx:1.25
imagePullPolicy: {{ .Values.image.pullPolicy }}
ports:
- name: http
containerPort: 80
protocol: TCP
livenessProbe:
httpGet:
path: /
port: http
readinessProbe:
httpGet:
path: /
port: http
resources:
{{- toYaml (merge .Values.publish.resources .Values.resources) | nindent 12 }}
volumeMounts:
- name: data
mountPath: "/data"
subPath: "public"
- name: "nginx-config"
mountPath: "/etc/nginx/conf.d"
{{- if .Values.extraVolumeMounts }}
{{- toYaml .Values.extraVolumeMounts | nindent 12 }}
{{- end }}
volumes:
- name: config
secret:
secretName: {{ include "aptly.configSecretName" . }}
{{- if .Values.gpg.enabled }}
- name: gpg
secret:
secretName: {{ include "aptly.gpgSecretName" . }}
{{- end }}
- name: nginx-config
configMap:
name: {{ include "aptly.fullname" . }}-publish
- name: data
persistentVolumeClaim:
{{- if .Values.persistence.existingClaim }}
claimName: {{ .Values.persistence.existingClaim | quote }}
{{- else }}
claimName: {{ include "aptly.fullname" . }}-data
{{- end }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
apiVersion: v1
kind: Pod
metadata:
name: "{{ include "aptly.fullname" . }}-test-connection"
labels:
{{- include "aptly.labels" . | nindent 4 }}
annotations:
"helm.sh/hook": test
spec:
containers:
- name: wget
image: busybox
command: ['wget']
args: ['{{ include "aptly.fullname" . }}:{{ .Values.service.port }}']
restartPolicy: Never
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment