Skip to content

Commit

Permalink
Fix make verify
Browse files Browse the repository at this point in the history
  • Loading branch information
Erkan Erol committed May 9, 2024
1 parent d4dbb6c commit 93e59ed
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Makefile.custom.mk
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ generate:

hack/generate-crd-version-patches.sh
hack/wrap-with-conditional.sh

hack/remove-curly-braces-for-helm.sh
verify: generate
@if ! git diff --exit-code ; then \
echo "Generated templates are out of date. Run make generate." ; \
Expand Down
16 changes: 16 additions & 0 deletions hack/remove-curly-braces-for-helm.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/usr/bin/env bash
# Exit on error.
set -o errexit -o nounset -o pipefail

#
# The CRD contains some templates in the descriptions and
# those break our helm templates. This script removes the
# curly braces from the CRD.
#

# Get repository path.
repository="$(realpath "$(dirname "${0}")/..")"


sed -i.bak -e 's/{{ //g' -e 's/ }}//g' "${repository}/helm/cluster-api/files/core/patches/versions/v1beta1/clusterclasses.cluster.x-k8s.io.yaml"
rm "${repository}/helm/cluster-api/files/core/patches/versions/v1beta1/clusterclasses.cluster.x-k8s.io.yaml.bak"
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@
description: NamingStrategy allows changing the naming pattern used when creating the control plane provider object.
properties:
template:
description: 'Template defines the template to use for generating the name of the ControlPlane object. If not defined, it will fallback to `.cluster.name.random` . If the templated string exceeds 63 characters, it will be trimmed to 58 characters and will get concatenated with a random suffix of length 5. The templating mechanism provides the following arguments: * `.cluster.name`: The name of the cluster object. * `.random`: A random alphanumeric string, without vowels, of length 5.'
description: 'Template defines the template to use for generating the name of the ControlPlane object. If not defined, it will fallback to `.cluster.name-.random`. If the templated string exceeds 63 characters, it will be trimmed to 58 characters and will get concatenated with a random suffix of length 5. The templating mechanism provides the following arguments: * `.cluster.name`: The name of the cluster object. * `.random`: A random alphanumeric string, without vowels, of length 5.'
type: string
type: object
nodeDeletionTimeout:
Expand Down Expand Up @@ -497,7 +497,7 @@
description: NamingStrategy allows changing the naming pattern used when creating the MachineDeployment.
properties:
template:
description: 'Template defines the template to use for generating the name of the MachineDeployment object. If not defined, it will fallback to `.cluster.name.machineDeployment.topologyName.random`. If the templated string exceeds 63 characters, it will be trimmed to 58 characters and will get concatenated with a random suffix of length 5. The templating mechanism provides the following arguments: * `.cluster.name`: The name of the cluster object. * `.random`: A random alphanumeric string, without vowels, of length 5. * `.machineDeployment.topologyName`: The name of the MachineDeployment topology (Cluster.spec.topology.workers.machineDeployments[].name).'
description: 'Template defines the template to use for generating the name of the MachineDeployment object. If not defined, it will fallback to `.cluster.name-.machineDeployment.topologyName-.random`. If the templated string exceeds 63 characters, it will be trimmed to 58 characters and will get concatenated with a random suffix of length 5. The templating mechanism provides the following arguments: * `.cluster.name`: The name of the cluster object. * `.random`: A random alphanumeric string, without vowels, of length 5. * `.machineDeployment.topologyName`: The name of the MachineDeployment topology (Cluster.spec.topology.workers.machineDeployments[].name).'
type: string
type: object
nodeDeletionTimeout:
Expand Down

0 comments on commit 93e59ed

Please sign in to comment.