Skip to content

Commit

Permalink
Merge branch 'master' into dependabot/go_modules/golang.org/x/net-0.17.0
Browse files Browse the repository at this point in the history
  • Loading branch information
harshavardhana authored Oct 25, 2023
2 parents 2a5bd24 + 9449191 commit 15608f4
Show file tree
Hide file tree
Showing 6 changed files with 80 additions and 22 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/vulncheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
go-version: [ 1.21.1 ]
go-version: [ 1.21.3 ]
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v3
Expand Down
7 changes: 7 additions & 0 deletions k8s/helm/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,13 @@ Create chart name and version as used by the chart label.
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
{{- end -}}

{{/*
Set the image tag to use.
*/}}
{{- define "warp.imageVersion" -}}
{{- default .Chart.AppVersion .Values.image.version -}}
{{- end -}}

{{/*
Common labels
*/}}
Expand Down
32 changes: 28 additions & 4 deletions k8s/helm/templates/job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ spec:
restartPolicy: Never
containers:
- name: {{ include "warp.fullname" . }}
image: "{{ .Values.image.repository }}:{{ .Chart.AppVersion }}"
image: "{{ .Values.image.repository }}:{{ include "warp.imageVersion" . }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
args:
- "{{ .Values.warpConfiguration.operationToBenchmark }}"
- "--warp-client=warp-{0...{{ sub .Values.replicaCount 1 }}}.warp.{{ .Release.Namespace }}"
- "--warp-client={{ include "warp.fullname" . }}-{0...{{ sub .Values.replicaCount 1 }}}.{{ include "warp.fullname" . }}.{{ .Release.Namespace }}"
{{- range $k, $v := .Values.warpJobArgs }}
- --{{ $k }}={{ $v }}
{{- end }}
Expand All @@ -28,10 +28,34 @@ spec:
- name: WARP_REGION
value: {{ .Values.warpConfiguration.s3ServerRegion | quote }}
- name: WARP_ACCESS_KEY
value: {{ .Values.warpConfiguration.s3AccessKey | quote }}
valueFrom:
secretKeyRef:
name: {{ include "warp.fullname" . }}-credentials
key: access_key
- name: WARP_SECRET_KEY
value: {{ .Values.warpConfiguration.s3SecretKey | quote }}
valueFrom:
secretKeyRef:
name: {{ include "warp.fullname" . }}-credentials
key: secret_key
{{- if .Values.serverResources }}
resources: {{- toYaml .Values.serverResources | nindent 12 }}
{{- end }}
{{- if .Values.securityContext }}
securityContext: {{- toYaml .Values.securityContext | nindent 12 }}
{{- end }}
{{- if .Values.serviceAccount.create }}
serviceAccountName: {{ include "warp.serviceAccountName" . }}
{{- end }}
{{- if .Values.podSecurityContext }}
securityContext: {{- .Values.podSecurityContext | toYaml | nindent 8 }}
{{- end }}
{{- if .Values.affinity }}
affinity: {{- .Values.affinity | toYaml | nindent 8 }}
{{- end }}
{{- if .Values.nodeSelector }}
nodeSelector: {{- .Values.nodeSelector | toYaml | nindent 8 }}
{{- end }}
{{- if .Values.tolerations }}
tolerations: {{- .Values.tolerations | toYaml | nindent 8 }}
{{- end }}
backoffLimit: 4
9 changes: 9 additions & 0 deletions k8s/helm/templates/secret.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
apiVersion: v1
kind: Secret
metadata:
name: {{ include "warp.fullname" . }}-credentials
labels:
{{- include "warp.labels" . | nindent 4 }}
data:
access_key: {{ .Values.warpConfiguration.s3AccessKey | b64enc }}
secret_key: {{ .Values.warpConfiguration.s3SecretKey | b64enc }}
19 changes: 17 additions & 2 deletions k8s/helm/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,31 @@ spec:
spec:
containers:
- name: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}:{{ .Chart.AppVersion }}"
image: "{{ .Values.image.repository }}:{{ include "warp.imageVersion" . }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
args:
- client
ports:
- name: http
containerPort: 7761
containerPort: {{ .Values.service.port }}
{{- if .Values.clientResources }}
resources: {{- toYaml .Values.clientResources | nindent 12 }}
{{- end }}
{{- if .Values.securityContext }}
securityContext: {{- toYaml .Values.securityContext | nindent 12 }}
{{- end }}
{{- if .Values.serviceAccount.create }}
serviceAccountName: {{ include "warp.serviceAccountName" . }}
{{- end }}
{{- if .Values.podSecurityContext }}
securityContext: {{- .Values.podSecurityContext | toYaml | nindent 8 }}
{{- end }}
{{- if .Values.affinity }}
affinity: {{- .Values.affinity | toYaml | nindent 8 }}
{{- end }}
{{- if .Values.nodeSelector }}
nodeSelector: {{- .Values.nodeSelector | toYaml | nindent 8 }}
{{- end }}
{{- if .Values.tolerations }}
tolerations: {{- .Values.tolerations | toYaml | nindent 8 }}
{{- end }}
33 changes: 18 additions & 15 deletions k8s/helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ replicaCount: 4
image:
repository: minio/warp
pullPolicy: IfNotPresent
# Set version to use a specific release of Warp
# version: latest

imagePullSecrets: []
nameOverride: ""
Expand Down Expand Up @@ -52,30 +54,31 @@ serviceAccount:
create: true
# The name of the service account to use.
# If not set and create is true, a name is generated using the fullname template
name:
# name:

podSecurityContext: {}
# fsGroup: 2000
securityContext:
readOnlyRootFilesystem: true

securityContext: {}
# capabilities:
# drop:
# - ALL
# readOnlyRootFilesystem: true
# runAsNonRoot: true
# runAsUser: 1000
podSecurityContext:
runAsNonRoot: true
runAsUser: 1001
fsGroup: 1001

service:
port: 7761

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:'.
serverResources: {}
# limits:
# cpu: 500m
# memory: 512Mi
# requests:
# cpu: 100m
# memory: 128Mi

clientResources: {}
# limits:
# cpu: 4
# memory: 512Mi
# requests:
# cpu: 100m
# memory: 128Mi
Expand Down

0 comments on commit 15608f4

Please sign in to comment.