Skip to content

Commit

Permalink
truncating long pod names
Browse files Browse the repository at this point in the history
  • Loading branch information
mcrowson committed Nov 13, 2024
1 parent faccad6 commit 8da034b
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 21 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ This repository is a collection of CrowdStrike Helm Charts. The Helm Charts deve
| [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. |
| [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. |
| [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. |
| [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. |

## Developer Guide
If you are a developer, please read our [Developer's Guide](docs/developer_guide.md).
Expand Down
4 changes: 2 additions & 2 deletions helm-charts/falcon-self-hosted-registry-assessment/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ 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: 1.0.0
version: 1.0.1

# 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.0.0"
appVersion: "1.0.1"
6 changes: 3 additions & 3 deletions helm-charts/falcon-self-hosted-registry-assessment/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -401,15 +401,15 @@ Copy the SHRA's `falcon-jobcontroller` and `falcon-registryassessmentexecutor` i
1. Create new environment variables for your chosen versions of the two SHRA images.
Replace `1.0.0` with the image tag you want to fetch.
```sh
export $FALCON_SHRA_JC_VERSION="1.0.0"
export $FALCON_SHRA_EX_VERSION="1.0.0"
export FALCON_SHRA_JC_VERSION="1.0.0"
export FALCON_SHRA_EX_VERSION="1.0.0"
```

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

1. Use `skopeo copy` to copy the job controller image from our registry to yours.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Expand the name of the chart.
*/}}
{{- define "ra-self-hosted.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
{{- default "shra" .Values.nameOverride | trunc 60 | trimSuffix "-" }}
{{- end }}

{{/*
Expand All @@ -12,38 +12,38 @@ If release name contains chart name it will be used as a full name.
*/}}
{{- define "ra-self-hosted.fullname" -}}
{{- if .Values.fullnameOverride }}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
{{- .Values.fullnameOverride | trunc 60 | trimSuffix "-" }}
{{- else }}
{{- $name := default .Chart.Name .Values.nameOverride }}
{{- $name := default "shra" .Values.nameOverride }}
{{- if contains $name .Release.Name }}
{{- .Release.Name | trunc 63 | trimSuffix "-" }}
{{- .Release.Name | trunc 60 | trimSuffix "-" }}
{{- else }}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
{{- printf "%s-%s" .Release.Name $name | trunc 60 | trimSuffix "-" }}
{{- end }}
{{- end }}
{{- end }}

{{- define "ra-self-hosted-executor.fullname" -}}
{{- printf "%s-%s" (include "ra-self-hosted.fullname" .) "executor" | trunc 63 | trimSuffix "-" }}
{{- printf "%s-%s" (include "ra-self-hosted.fullname" .) "executor" | trunc 60 | trimSuffix "-" }}
{{- end -}}

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

{{- define "ra-self-hosted-job-controller.fullname" -}}
{{- printf "%s-%s" (include "ra-self-hosted.fullname" .) "job-controller" | trunc 63 | trimSuffix "-" }}
{{- printf "%s-%s" (include "ra-self-hosted.fullname" .) "job-controller" | trunc 60 | trimSuffix "-" }}
{{- end -}}

{{- define "ra-self-hosted-job-controller.pullsecret-name" -}}
{{- printf "%s-%s-pullsecret" (include "ra-self-hosted.fullname" .) "job-controller" | trunc 63 | trimSuffix "-" }}
{{- printf "%s-%s-pullsecret" (include "ra-self-hosted.fullname" .) "job-controller" | trunc 60 | trimSuffix "-" }}
{{- end -}}

{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "ra-self-hosted.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 60 | trimSuffix "-" }}
{{- end }}

{{/*
Expand Down Expand Up @@ -148,15 +148,15 @@ app.kubernetes.io/instance: {{ .Release.Name }}
{{- end -}}

{{- define "ra-self-hosted-job-controller.db-pvc-name" -}}
{{- if .Values.jobController.dbStorage.create -}} {{- printf "%s-%s" (include "ra-self-hosted-job-controller.fullname" .) "db" | trunc 63 -}} {{- else -}} {{ .Values.jobController.dbStorage.existingClaimName }} {{- end -}}
{{- if .Values.jobController.dbStorage.create -}} {{- printf "%s-%s" (include "ra-self-hosted-job-controller.fullname" .) "db" | trunc 60 -}} {{- else -}} {{ .Values.jobController.dbStorage.existingClaimName }} {{- end -}}
{{- end -}}

{{- define "ra-self-hosted-executor.db-pvc-name" -}}
{{- if .Values.executor.dbStorage.create -}} {{- printf "%s-%s" (include "ra-self-hosted-executor.fullname" .) "db" | trunc 63 -}} {{- else -}} {{ .Values.executor.dbStorage.existingClaimName }} {{- end -}}
{{- if .Values.executor.dbStorage.create -}} {{- printf "%s-%s" (include "ra-self-hosted-executor.fullname" .) "db" | trunc 60 -}} {{- else -}} {{ .Values.executor.dbStorage.existingClaimName }} {{- end -}}
{{- end -}}

{{- define "ra-self-hosted-executor.storage-pvc-name" -}}
{{- if .Values.executor.assessmentStorage.pvc.create -}} {{- printf "%s-%s" (include "ra-self-hosted-executor.fullname" .) "storage" | trunc 63 -}} {{- else -}} {{ .Values.executor.assessmentStorage.pvc.existingClaimName }} {{- end -}}
{{- if .Values.executor.assessmentStorage.pvc.create -}} {{- printf "%s-%s" (include "ra-self-hosted-executor.fullname" .) "storage" | trunc 60 -}} {{- else -}} {{ .Values.executor.assessmentStorage.pvc.existingClaimName }} {{- end -}}
{{- end -}}

{{- define "ra-self-hosted-executor.registry-credentials-json" -}}
Expand Down Expand Up @@ -228,7 +228,7 @@ app.kubernetes.io/instance: {{ .Release.Name }}

{{- define "ra-self-hosted.cert-secret-name" }}
{{- if .Values.tls.useCertManager -}}
{{- printf "%s-%s" (include "ra-self-hosted.fullname" .) "tls" | trunc 63 }}
{{- printf "%s-%s" (include "ra-self-hosted.fullname" .) "tls" | trunc 60 }}
{{- else -}}
{{- .Values.tls.existingSecret -}}
{{- end -}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ spec:
labels:
{{- include "ra-self-hosted.labels-executor" . | nindent 8 }}
annotations:
checksum/config: {{ include (print $.Template.BasePath "/executor-comfigmap.yaml") . | sha256sum }}
checksum/config: {{ include (print $.Template.BasePath "/executor-configmap.yaml") . | sha256sum }}
{{ if .Values.executor.podAnnotations -}}
{{- .Values.executor.podAnnotations | indent 8 -}}
{{- end }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ spec:
labels:
{{- include "ra-self-hosted-job-controller.labels" . | nindent 8 }}
annotations:
checksum/config: {{ include (print $.Template.BasePath "/job-controller-comfigmap.yaml") . | sha256sum }}
checksum/config: {{ include (print $.Template.BasePath "/job-controller-configmap.yaml") . | sha256sum }}
spec:
securityContext:
fsGroup: 2001
Expand Down

0 comments on commit 8da034b

Please sign in to comment.