From 42b0fc360e23b5374c2bfcebf38499b187508361 Mon Sep 17 00:00:00 2001 From: Matthew Crowson Date: Wed, 13 Nov 2024 14:37:36 -0500 Subject: [PATCH] truncating long pod names --- README.md | 1 + .../Chart.yaml | 2 +- .../README.md | 8 ++++---- .../templates/_helpers.tpl | 16 ++++++++-------- ...or-comfigmap.yaml => executor-configmap.yaml} | 0 .../templates/executor-deployment.yaml | 2 +- ...figmap.yaml => job-controller-configmap.yaml} | 0 .../templates/job-controller-deployment.yaml | 2 +- 8 files changed, 16 insertions(+), 15 deletions(-) rename helm-charts/falcon-self-hosted-registry-assessment/templates/{executor-comfigmap.yaml => executor-configmap.yaml} (100%) rename helm-charts/falcon-self-hosted-registry-assessment/templates/{job-controller-comfigmap.yaml => job-controller-configmap.yaml} (100%) diff --git a/README.md b/README.md index a9eed393..c5e238e3 100644 --- a/README.md +++ b/README.md @@ -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). diff --git a/helm-charts/falcon-self-hosted-registry-assessment/Chart.yaml b/helm-charts/falcon-self-hosted-registry-assessment/Chart.yaml index b13dd64c..e4f727fd 100644 --- a/helm-charts/falcon-self-hosted-registry-assessment/Chart.yaml +++ b/helm-charts/falcon-self-hosted-registry-assessment/Chart.yaml @@ -15,7 +15,7 @@ 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 diff --git a/helm-charts/falcon-self-hosted-registry-assessment/README.md b/helm-charts/falcon-self-hosted-registry-assessment/README.md index 4ca77298..ccecb3bd 100644 --- a/helm-charts/falcon-self-hosted-registry-assessment/README.md +++ b/helm-charts/falcon-self-hosted-registry-assessment/README.md @@ -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=/falcon-selfhostedregistryassessment + export MY_SHRA_REPO=/falcon-selfhostedregistryassessment ``` 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 helm upgrade --install -f \ --create-namespace \ --namespace falcon-self-hosted-registry-assessment \ - falcon-self-hosted-registry-assessment \ + falcon-shra \ crowdstrike/falcon-self-hosted-registry-assessment ``` diff --git a/helm-charts/falcon-self-hosted-registry-assessment/templates/_helpers.tpl b/helm-charts/falcon-self-hosted-registry-assessment/templates/_helpers.tpl index 86501e96..4139c6e8 100644 --- a/helm-charts/falcon-self-hosted-registry-assessment/templates/_helpers.tpl +++ b/helm-charts/falcon-self-hosted-registry-assessment/templates/_helpers.tpl @@ -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 40 | trimSuffix "-" }} {{- end }} {{/* @@ -12,19 +12,19 @@ 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 40 | 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 40 | trimSuffix "-" }} {{- else }} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} +{{- printf "%s-%s" .Release.Name $name | trunc 50 | 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 52 | trimSuffix "-" }} {{- end -}} {{- define "ra-self-hosted-executor.pullsecret-name" -}} @@ -32,7 +32,7 @@ If release name contains chart name it will be used as a full name. {{- 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 52 | trimSuffix "-" }} {{- end -}} {{- define "ra-self-hosted-job-controller.pullsecret-name" -}} @@ -232,4 +232,4 @@ app.kubernetes.io/instance: {{ .Release.Name }} {{- else -}} {{- .Values.tls.existingSecret -}} {{- end -}} -{{- end -}} +{{- end -}} \ No newline at end of file diff --git a/helm-charts/falcon-self-hosted-registry-assessment/templates/executor-comfigmap.yaml b/helm-charts/falcon-self-hosted-registry-assessment/templates/executor-configmap.yaml similarity index 100% rename from helm-charts/falcon-self-hosted-registry-assessment/templates/executor-comfigmap.yaml rename to helm-charts/falcon-self-hosted-registry-assessment/templates/executor-configmap.yaml diff --git a/helm-charts/falcon-self-hosted-registry-assessment/templates/executor-deployment.yaml b/helm-charts/falcon-self-hosted-registry-assessment/templates/executor-deployment.yaml index 5eea4764..0c4cda32 100644 --- a/helm-charts/falcon-self-hosted-registry-assessment/templates/executor-deployment.yaml +++ b/helm-charts/falcon-self-hosted-registry-assessment/templates/executor-deployment.yaml @@ -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 }} diff --git a/helm-charts/falcon-self-hosted-registry-assessment/templates/job-controller-comfigmap.yaml b/helm-charts/falcon-self-hosted-registry-assessment/templates/job-controller-configmap.yaml similarity index 100% rename from helm-charts/falcon-self-hosted-registry-assessment/templates/job-controller-comfigmap.yaml rename to helm-charts/falcon-self-hosted-registry-assessment/templates/job-controller-configmap.yaml diff --git a/helm-charts/falcon-self-hosted-registry-assessment/templates/job-controller-deployment.yaml b/helm-charts/falcon-self-hosted-registry-assessment/templates/job-controller-deployment.yaml index 30648286..7bd55458 100644 --- a/helm-charts/falcon-self-hosted-registry-assessment/templates/job-controller-deployment.yaml +++ b/helm-charts/falcon-self-hosted-registry-assessment/templates/job-controller-deployment.yaml @@ -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