Skip to content

Commit

Permalink
cleanup manifests
Browse files Browse the repository at this point in the history
Signed-off-by: Sam Batschelet <[email protected]>
  • Loading branch information
hexfusion committed Apr 12, 2024
1 parent a81a15a commit 9f8afbd
Show file tree
Hide file tree
Showing 26 changed files with 11,828 additions and 1,064 deletions.
38 changes: 20 additions & 18 deletions hack/crds-sync.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,30 @@

set -euo pipefail

# map names of CRD files between the vendored openshift/api repository and the ./install directory
srcs=(
"vendor/github.com/openshift/api/machineconfiguration/v1/zz_generated.crd-manifests/"
"vendor/github.com/openshift/api/machineconfiguration/v1alpha1/zz_generated.crd-manifests/"
)

dst="install/"

for src in "${srcs[@]}"; do
for file in "${src}"0000_80_machine-config*.yaml; do
base=$(basename "$file")
new="${base/0000_80_machine-config/0000_80_machine-config-operator}"
cp -- "$file" "${dst}${new}"
done
done

CRDS_MAPPING=(
"v1/zz_generated.crd-manifests/0000_80_machine-config_01_containerruntimeconfigs.crd.yaml:0000_80_machine-config_01_containerruntimeconfig.crd.yaml"
"v1/zz_generated.crd-manifests/0000_80_machine-config_01_kubeletconfigs.crd.yaml:0000_80_machine-config_01_kubeletconfig.crd.yaml"
"v1/zz_generated.crd-manifests/0000_80_machine-config_01_machineconfigs.crd.yaml:0000_80_machine-config_01_machineconfig.crd.yaml"
"v1/zz_generated.crd-manifests/0000_80_machine-config_01_machineconfigpools-Default.crd.yaml:0000_80_machine-config_01_machineconfigpool.crd.yaml"
"v1alpha1/zz_generated.crd-manifests/0000_80_machine-config_01_machineconfignodes-TechPreviewNoUpgrade.crd.yaml:0000_80_machine-config_01_machineconfignode-TechPreviewNoUpgrade.crd.yaml"
"v1alpha1/zz_generated.crd-manifests/0000_80_machine-config_01_pinnedimagesets-TechPreviewNoUpgrade.crd.yaml:0000_80_machine-config_01_pinnedimagesets-TechPreviewNoUpgrade.crd.yaml"
)
#TODO(jkyros): 0000_80_machine-config_01_machine-config-operator_02_containerruntimeconfig.crd.yaml)
"operator/v1/zz_generated.crd-manifests/0000_80_machine-config_01_machineconfigurations-Default.crd.yaml:0000_80_machine-config-operator_01_machineconfigurations-Default.crd.yaml"
"operator/v1/zz_generated.crd-manifests/0000_80_machine-config_01_machineconfigurations-TechPreviewNoUpgrade.crd.yaml:0000_80_machine-config-operator_01_machineconfigurations-TechPreviewNoUpgrade.crd.yaml"
"config/v1alpha1/zz_generated.crd-manifests/0000_10_config-operator_01_clusterimagepolicies-TechPreviewNoUpgrade.crd.yaml:0000_10_config-operator_01_clusterimagepolicies-TechPreviewNoUpgrade.crd.yaml"
)

for crd in "${CRDS_MAPPING[@]}" ; do
SRC="${crd%%:*}"
DES="${crd##*:}"
cp "vendor/github.com/openshift/api/machineconfiguration/$SRC" "install/$DES"
cp "vendor/github.com/openshift/api/$SRC" "install/$DES"
done

#this one goes in manifests rather than install, but should it?
cp "vendor/github.com/openshift/api/config/v1alpha1/zz_generated.crd-manifests/0000_10_config-operator_01_clusterimagepolicies-TechPreviewNoUpgrade.crd.yaml" "install/0000_10_config-operator_01_clusterimagepolicies-TechPreviewNoUpgrade.crd.yaml"
cp "vendor/github.com/openshift/api/machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_controllerconfigs-Default.crd.yaml" "manifests/controllerconfig.crd.yaml"
cp "vendor/github.com/openshift/api/machineconfiguration/v1alpha1/zz_generated.crd-manifests/0000_80_machine-config_01_machineconfignodes-TechPreviewNoUpgrade.crd.yaml" "manifests/0000_80_machine-config_01_machineconfignode-TechPreviewNoUpgrade.crd.yaml"
#cp "vendor/github.com/openshift/api/operator/v1/zz_generated.crd-manifests/0000_80_machine-config_01_config.crd.yaml" "install/0000_80_machine-config_01_config.crd.yaml"
cp "vendor/github.com/openshift/api/machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_controllerconfigs-Default.crd.yaml" "manifests/controllerconfig.crd.yaml"
cp "vendor/github.com/openshift/api/machineconfiguration/v1alpha1/zz_generated.crd-manifests/0000_80_machine-config_01_machineconfignodes-TechPreviewNoUpgrade.crd.yaml" "manifests/0000_80_machine-config_01_machineconfignode-TechPreviewNoUpgrade.crd.yaml"
cp "vendor/github.com/openshift/api/machineconfiguration/v1alpha1/zz_generated.crd-manifests/0000_80_machine-config_01_pinnedimagesets-TechPreviewNoUpgrade.crd.yaml" "manifests/0000_80_machine-config_01_pinnedimagesets-TechPreviewNoUpgrade.crd.yaml"

Large diffs are not rendered by default.

2,457 changes: 2,457 additions & 0 deletions install/0000_80_machine-config-operator_01_controllerconfigs-Default.crd.yaml

Large diffs are not rendered by default.

Large diffs are not rendered by default.

158 changes: 0 additions & 158 deletions install/0000_80_machine-config-operator_01_kubeletconfig.crd.yaml

This file was deleted.

Loading

0 comments on commit 9f8afbd

Please sign in to comment.