Skip to content

Commit 4abe394

Browse files
authored
Merge pull request #334 from mcrowson/pod-name-trunc
SHRA truncating long pod names
2 parents faccad6 + 42b0fc3 commit 4abe394

File tree

8 files changed

+16
-15
lines changed

8 files changed

+16
-15
lines changed

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ This repository is a collection of CrowdStrike Helm Charts. The Helm Charts deve
1717
| [Falcon Integration Gateway](helm-charts/falcon-integration-gateway) | Deploys the Falcon Integration Gateway. See [the README](helm-charts/falcon-integration-gateway/README.md) for more info. |
1818
| [Falcon Kubernetes Admission Controller](helm-charts/falcon-kac) | Deploy the Falcon Kubernetes Admission Controller. See [the README](helm-charts/falcon-kac/README.md) for more info. |
1919
| [Falcon Image Analyzer](helm-charts/falcon-image-analyzer) | Deploy the Falcon Image Analyzer. See [the README](helm-charts/falcon-image-analyzer/README.md) for more info. |
20+
| [Falcon Self Hosted Registry Assessment](helm-charts/falcon-self-hosted-registry-assessment) | Deploy the Falcon Self Hosted Registry Assessment. See [the README](helm-charts/falcon-self-hosted-registry-assessment/README.md) for more info. |
2021

2122
## Developer Guide
2223
If you are a developer, please read our [Developer's Guide](docs/developer_guide.md).

helm-charts/falcon-self-hosted-registry-assessment/Chart.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ type: application
1515
# This is the chart version. This version number should be incremented each time you make changes
1616
# to the chart and its templates, including the app version.
1717
# Versions are expected to follow Semantic Versioning (https://semver.org/)
18-
version: 1.0.0
18+
version: 1.0.1
1919

2020
# This is the version number of the application being deployed. This version number should be
2121
# incremented each time you make changes to the application. Versions are not expected to

helm-charts/falcon-self-hosted-registry-assessment/README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -401,15 +401,15 @@ Copy the SHRA's `falcon-jobcontroller` and `falcon-registryassessmentexecutor` i
401401
1. Create new environment variables for your chosen versions of the two SHRA images.
402402
Replace `1.0.0` with the image tag you want to fetch.
403403
```sh
404-
export $FALCON_SHRA_JC_VERSION="1.0.0"
405-
export $FALCON_SHRA_EX_VERSION="1.0.0"
404+
export FALCON_SHRA_JC_VERSION="1.0.0"
405+
export FALCON_SHRA_EX_VERSION="1.0.0"
406406
```
407407

408408
1. Set an environment variable with the URL for your private registry, where you'll store these images.
409409
We recommend using `falcon-selfhostedregistryassessment` in your repository name.
410410
Adjust this sample with your registry's URL and to match your repository naming scheme.
411411
```sh
412-
export $MY_SHRA_REPO=<your-registry-url>/falcon-selfhostedregistryassessment
412+
export MY_SHRA_REPO=<your-registry-url>/falcon-selfhostedregistryassessment
413413
```
414414

415415
1. Use `skopeo copy` to copy the job controller image from our registry to yours.
@@ -1331,7 +1331,7 @@ Before you install, follow the configuration steps above to prepare your account
13311331
helm upgrade --install -f </path/to/values_override.yaml> \
13321332
--create-namespace \
13331333
--namespace falcon-self-hosted-registry-assessment \
1334-
falcon-self-hosted-registry-assessment \
1334+
falcon-shra \
13351335
crowdstrike/falcon-self-hosted-registry-assessment
13361336
```
13371337

helm-charts/falcon-self-hosted-registry-assessment/templates/_helpers.tpl

+8-8
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
Expand the name of the chart.
33
*/}}
44
{{- define "ra-self-hosted.name" -}}
5-
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
5+
{{- default "shra" .Values.nameOverride | trunc 40 | trimSuffix "-" }}
66
{{- end }}
77

88
{{/*
@@ -12,27 +12,27 @@ If release name contains chart name it will be used as a full name.
1212
*/}}
1313
{{- define "ra-self-hosted.fullname" -}}
1414
{{- if .Values.fullnameOverride }}
15-
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
15+
{{- .Values.fullnameOverride | trunc 40 | trimSuffix "-" }}
1616
{{- else }}
17-
{{- $name := default .Chart.Name .Values.nameOverride }}
17+
{{- $name := default "shra" .Values.nameOverride }}
1818
{{- if contains $name .Release.Name }}
19-
{{- .Release.Name | trunc 63 | trimSuffix "-" }}
19+
{{- .Release.Name | trunc 40 | trimSuffix "-" }}
2020
{{- else }}
21-
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
21+
{{- printf "%s-%s" .Release.Name $name | trunc 50 | trimSuffix "-" }}
2222
{{- end }}
2323
{{- end }}
2424
{{- end }}
2525

2626
{{- define "ra-self-hosted-executor.fullname" -}}
27-
{{- printf "%s-%s" (include "ra-self-hosted.fullname" .) "executor" | trunc 63 | trimSuffix "-" }}
27+
{{- printf "%s-%s" (include "ra-self-hosted.fullname" .) "executor" | trunc 52 | trimSuffix "-" }}
2828
{{- end -}}
2929

3030
{{- define "ra-self-hosted-executor.pullsecret-name" -}}
3131
{{- printf "%s-%s-pullsecret" (include "ra-self-hosted.fullname" .) "executor" | trunc 63 | trimSuffix "-" }}
3232
{{- end -}}
3333

3434
{{- define "ra-self-hosted-job-controller.fullname" -}}
35-
{{- printf "%s-%s" (include "ra-self-hosted.fullname" .) "job-controller" | trunc 63 | trimSuffix "-" }}
35+
{{- printf "%s-%s" (include "ra-self-hosted.fullname" .) "job-controller" | trunc 52 | trimSuffix "-" }}
3636
{{- end -}}
3737

3838
{{- define "ra-self-hosted-job-controller.pullsecret-name" -}}
@@ -232,4 +232,4 @@ app.kubernetes.io/instance: {{ .Release.Name }}
232232
{{- else -}}
233233
{{- .Values.tls.existingSecret -}}
234234
{{- end -}}
235-
{{- end -}}
235+
{{- end -}}

helm-charts/falcon-self-hosted-registry-assessment/templates/executor-deployment.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ spec:
1616
labels:
1717
{{- include "ra-self-hosted.labels-executor" . | nindent 8 }}
1818
annotations:
19-
checksum/config: {{ include (print $.Template.BasePath "/executor-comfigmap.yaml") . | sha256sum }}
19+
checksum/config: {{ include (print $.Template.BasePath "/executor-configmap.yaml") . | sha256sum }}
2020
{{ if .Values.executor.podAnnotations -}}
2121
{{- .Values.executor.podAnnotations | indent 8 -}}
2222
{{- end }}

helm-charts/falcon-self-hosted-registry-assessment/templates/job-controller-deployment.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ spec:
1616
labels:
1717
{{- include "ra-self-hosted-job-controller.labels" . | nindent 8 }}
1818
annotations:
19-
checksum/config: {{ include (print $.Template.BasePath "/job-controller-comfigmap.yaml") . | sha256sum }}
19+
checksum/config: {{ include (print $.Template.BasePath "/job-controller-configmap.yaml") . | sha256sum }}
2020
spec:
2121
securityContext:
2222
fsGroup: 2001

0 commit comments

Comments
 (0)