Skip to content
This repository was archived by the owner on Apr 11, 2024. It is now read-only.

Commit 47e578a

Browse files
authored
fix: rename cpi to ccm (#11)
CPI is a term unique to the vSphere CCM. Renaming to the more generic "CCM".
1 parent b0761a7 commit 47e578a

File tree

19 files changed

+136
-136
lines changed

19 files changed

+136
-136
lines changed

api/v1alpha1/addon_types.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ type Addons struct {
2020
ClusterAutoscaler *ClusterAutoscaler `json:"clusterAutoscaler,omitempty"`
2121

2222
// +optional
23-
CPI *CPI `json:"cpi,omitempty"`
23+
CCM *CCM `json:"ccm,omitempty"`
2424

2525
// +optional
2626
CSIProviders *CSIProviders `json:"csi,omitempty"`
@@ -36,7 +36,7 @@ func (Addons) VariableSchema() clusterv1.VariableSchema {
3636
"nfd": NFD{}.VariableSchema().OpenAPIV3Schema,
3737
"clusterAutoscaler": ClusterAutoscaler{}.VariableSchema().OpenAPIV3Schema,
3838
"csi": CSIProviders{}.VariableSchema().OpenAPIV3Schema,
39-
"cpi": CPI{}.VariableSchema().OpenAPIV3Schema,
39+
"ccm": CCM{}.VariableSchema().OpenAPIV3Schema,
4040
},
4141
},
4242
}
@@ -173,10 +173,10 @@ func (CSIProviders) VariableSchema() clusterv1.VariableSchema {
173173
}
174174
}
175175

176-
// CPI tells us to enable or disable the cloud provider interface.
177-
type CPI struct{}
176+
// CCM tells us to enable or disable the cloud provider interface.
177+
type CCM struct{}
178178

179-
func (CPI) VariableSchema() clusterv1.VariableSchema {
179+
func (CCM) VariableSchema() clusterv1.VariableSchema {
180180
return clusterv1.VariableSchema{
181181
OpenAPIV3Schema: clusterv1.JSONSchemaProps{
182182
Type: "object",

api/v1alpha1/clusterconfig_types.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,17 @@ const (
2020

2121
CSIProviderAWSEBS = "aws-ebs"
2222

23-
CPIProviderAWS = "aws"
23+
CCMProviderAWS = "aws"
2424
)
2525

26-
//+kubebuilder:object:root=true
26+
// +kubebuilder:object:root=true
2727

2828
// ClusterConfig is the Schema for the clusterconfigs API.
2929
type ClusterConfig struct {
3030
metav1.TypeMeta `json:",inline"`
3131
metav1.ObjectMeta `json:"metadata,omitempty"`
3232

33-
//+optional
33+
// +optional
3434
Spec ClusterConfigSpec `json:"spec,omitempty"`
3535
}
3636

@@ -43,7 +43,7 @@ type ClusterConfigSpec struct {
4343

4444
GenericClusterConfig `json:",inline"`
4545

46-
//+optional
46+
// +optional
4747
ControlPlane *NodeConfigSpec `json:"controlPlane,omitempty"`
4848
}
4949

@@ -140,11 +140,11 @@ func (v KubernetesImageRepository) String() string {
140140

141141
type Image struct {
142142
// Repository is used to override the image repository to pull from.
143-
//+optional
143+
// +optional
144144
Repository string `json:"repository,omitempty"`
145145

146146
// Tag is used to override the default image tag.
147-
//+optional
147+
// +optional
148148
Tag string `json:"tag,omitempty"`
149149
}
150150

@@ -170,7 +170,7 @@ func (Image) VariableSchema() clusterv1.VariableSchema {
170170

171171
type Etcd struct {
172172
// Image required for overriding etcd image details.
173-
//+optional
173+
// +optional
174174
Image *Image `json:"image,omitempty"`
175175
}
176176

api/v1alpha1/zz_generated.deepcopy.go

Lines changed: 11 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33

44
#=================================================================
55
# DO NOT EDIT THIS FILE
6-
# IT HAS BEEN GENERATED BY /hack/addons/update-aws-cpi.sh
6+
# IT HAS BEEN GENERATED BY /hack/addons/update-aws-ccm.sh
77
#=================================================================
88
apiVersion: v1
99
data:
10-
aws-cpi-v1.27.1.yaml: |
10+
aws-ccm-v1.27.1.yaml: |
1111
apiVersion: v1
1212
kind: ServiceAccount
1313
metadata:
@@ -185,4 +185,4 @@ data:
185185
kind: ConfigMap
186186
metadata:
187187
creationTimestamp: null
188-
name: aws-cpi-v1.27.1
188+
name: aws-ccm-v1.27.1
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33

44
#=================================================================
55
# DO NOT EDIT THIS FILE
6-
# IT HAS BEEN GENERATED BY /hack/addons/update-aws-cpi.sh
6+
# IT HAS BEEN GENERATED BY /hack/addons/update-aws-ccm.sh
77
#=================================================================
88
apiVersion: v1
99
data:
10-
aws-cpi-v1.28.1.yaml: |
10+
aws-ccm-v1.28.1.yaml: |
1111
apiVersion: v1
1212
kind: ServiceAccount
1313
metadata:
@@ -185,4 +185,4 @@ data:
185185
kind: ConfigMap
186186
metadata:
187187
creationTimestamp: null
188-
name: aws-cpi-v1.28.1
188+
name: aws-ccm-v1.28.1

examples/capi-quick-start/aws-cluster-calico-crs.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,12 @@ spec:
2121
- name: clusterConfig
2222
value:
2323
addons:
24+
ccm: {}
2425
clusterAutoscaler:
2526
strategy: ClusterResourceSet
2627
cni:
2728
provider: Calico
2829
strategy: ClusterResourceSet
29-
cpi: {}
3030
csi:
3131
providers:
3232
- name: aws-ebs

examples/capi-quick-start/aws-cluster-calico-helm-addon.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,12 @@ spec:
2121
- name: clusterConfig
2222
value:
2323
addons:
24+
ccm: {}
2425
clusterAutoscaler:
2526
strategy: HelmAddon
2627
cni:
2728
provider: Calico
2829
strategy: HelmAddon
29-
cpi: {}
3030
csi:
3131
providers:
3232
- name: aws-ebs

examples/capi-quick-start/aws-cluster-cilium-crs.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,12 @@ spec:
2121
- name: clusterConfig
2222
value:
2323
addons:
24+
ccm: {}
2425
clusterAutoscaler:
2526
strategy: ClusterResourceSet
2627
cni:
2728
provider: Cilium
2829
strategy: ClusterResourceSet
29-
cpi: {}
3030
csi:
3131
providers:
3232
- name: aws-ebs

examples/capi-quick-start/aws-cluster-cilium-helm-addon.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,12 @@ spec:
2121
- name: clusterConfig
2222
value:
2323
addons:
24+
ccm: {}
2425
clusterAutoscaler:
2526
strategy: HelmAddon
2627
cni:
2728
provider: Cilium
2829
strategy: HelmAddon
29-
cpi: {}
3030
csi:
3131
providers:
3232
- name: aws-ebs

hack/addons/kustomize/aws-cpi/kustomization.yaml.tmpl renamed to hack/addons/kustomize/aws-ccm/kustomization.yaml.tmpl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@ apiVersion: kustomize.config.k8s.io/v1beta1
55
kind: Kustomization
66

77
metadata:
8-
name: aws-cpi-kustomize
8+
name: aws-ccm-kustomize
99

1010
helmCharts:
1111
- name: aws-cloud-controller-manager
1212
repo: https://kubernetes.github.io/cloud-provider-aws
1313
releaseName: aws-cloud-controller-manager
14-
version: ${AWS_CPI_CHART_VERSION}
14+
version: ${AWS_CCM_CHART_VERSION}
1515
includeCRDs: true
1616
skipTests: true
1717

@@ -25,4 +25,4 @@ patches:
2525

2626
images:
2727
- name: registry.k8s.io/provider-aws/cloud-controller-manager
28-
newTag: ${AWS_CPI_VERSION}
28+
newTag: ${AWS_CCM_VERSION}

hack/addons/update-aws-cpi.sh renamed to hack/addons/update-aws-ccm.sh

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,37 +8,37 @@ readonly SCRIPT_DIR
88
# shellcheck source=hack/common.sh
99
source "${SCRIPT_DIR}/../common.sh"
1010

11-
AWS_CPI_VERSION=$1
12-
export AWS_CPI_VERSION
13-
AWS_CPI_CHART_VERSION=$2
14-
export AWS_CPI_CHART_VERSION
11+
AWS_CCM_VERSION=$1
12+
export AWS_CCM_VERSION
13+
AWS_CCM_CHART_VERSION=$2
14+
export AWS_CCM_CHART_VERSION
1515

16-
if [ -z "${AWS_CPI_VERSION:-}" ]; then
17-
echo "Missing argument: AWS_CPI_VERSION"
16+
if [ -z "${AWS_CCM_VERSION:-}" ]; then
17+
echo "Missing argument: AWS_CCM_VERSION"
1818
exit 1
1919
fi
2020

2121
ASSETS_DIR="$(mktemp -d -p "${TMPDIR:-/tmp}")"
2222
readonly ASSETS_DIR
2323
trap_add "rm -rf ${ASSETS_DIR}" EXIT
2424

25-
readonly KUSTOMIZE_BASE_DIR="${SCRIPT_DIR}/kustomize/aws-cpi/"
25+
readonly KUSTOMIZE_BASE_DIR="${SCRIPT_DIR}/kustomize/aws-ccm/"
2626
envsubst -no-unset <"${KUSTOMIZE_BASE_DIR}/kustomization.yaml.tmpl" >"${ASSETS_DIR}/kustomization.yaml"
2727

28-
readonly FILE_NAME="aws-cpi-${AWS_CPI_VERSION}.yaml"
28+
readonly FILE_NAME="aws-ccm-${AWS_CCM_VERSION}.yaml"
2929
kustomize build --enable-helm "${ASSETS_DIR}" >"${ASSETS_DIR}/${FILE_NAME}"
3030

31-
kubectl create configmap aws-cpi-"${AWS_CPI_VERSION}" --dry-run=client --output yaml \
31+
kubectl create configmap aws-ccm-"${AWS_CCM_VERSION}" --dry-run=client --output yaml \
3232
--from-file "${ASSETS_DIR}/${FILE_NAME}" \
33-
>"${ASSETS_DIR}/aws-cpi-${AWS_CPI_VERSION}-configmap.yaml"
33+
>"${ASSETS_DIR}/aws-ccm-${AWS_CCM_VERSION}-configmap.yaml"
3434

3535
# add warning not to edit file directly
36-
cat <<EOF >"${GIT_REPO_ROOT}/charts/cluster-api-runtime-extensions-nutanix/templates/cpi/aws/manifests/aws-cpi-${AWS_CPI_VERSION}-configmap.yaml"
36+
cat <<EOF >"${GIT_REPO_ROOT}/charts/cluster-api-runtime-extensions-nutanix/templates/ccm/aws/manifests/aws-ccm-${AWS_CCM_VERSION}-configmap.yaml"
3737
$(cat "${GIT_REPO_ROOT}/hack/license-header.yaml.txt")
3838
3939
#=================================================================
4040
# DO NOT EDIT THIS FILE
41-
# IT HAS BEEN GENERATED BY /hack/addons/update-aws-cpi.sh
41+
# IT HAS BEEN GENERATED BY /hack/addons/update-aws-ccm.sh
4242
#=================================================================
43-
$(cat "${ASSETS_DIR}/aws-cpi-${AWS_CPI_VERSION}-configmap.yaml")
43+
$(cat "${ASSETS_DIR}/aws-ccm-${AWS_CCM_VERSION}-configmap.yaml")
4444
EOF

hack/examples/bases/aws/cluster/kustomization.yaml.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ patches:
3535
path: ../../../patches/cluster-autoscaler.yaml
3636
- target:
3737
kind: Cluster
38-
path: ../../../patches/cpi.yaml
38+
path: ../../../patches/ccm.yaml
3939
- target:
4040
kind: Cluster
4141
path: ../../../patches/aws/csi.yaml

hack/examples/patches/cpi.yaml renamed to hack/examples/patches/ccm.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
# SPDX-License-Identifier: Apache-2.0
33

44
- op: "add"
5-
path: "/spec/topology/variables/0/value/addons/cpi"
5+
path: "/spec/topology/variables/0/value/addons/ccm"
66
value: {}

make/addons.mk

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@ export NODE_FEATURE_DISCOVERY_VERSION := $(shell goprintconst -file pkg/handlers
77
export CLUSTER_AUTOSCALER_VERSION := 9.35.0
88
export AWS_CSI_SNAPSHOT_CONTROLLER_VERSION := v6.3.3
99
export AWS_EBS_CSI_CHART_VERSION := v2.28.1
10-
# a map of AWS CPI versions
11-
export AWS_CPI_VERSION_127 := v1.27.1
12-
export AWS_CPI_CHART_VERSION_127 := 0.0.8
13-
export AWS_CPI_VERSION_128 := v1.28.1
14-
export AWS_CPI_CHART_VERSION_128 := 0.0.8
10+
# a map of AWS CCM versions
11+
export AWS_CCM_VERSION_127 := v1.27.1
12+
export AWS_CCM_CHART_VERSION_127 := 0.0.8
13+
export AWS_CCM_VERSION_128 := v1.28.1
14+
export AWS_CCM_CHART_VERSION_128 := 0.0.8
1515

1616
.PHONY: addons.sync
17-
addons.sync: $(addprefix update-addon.,calico cilium nfd cluster-autoscaler aws-ebs-csi aws-cpi.127 aws-cpi.128)
17+
addons.sync: $(addprefix update-addon.,calico cilium nfd cluster-autoscaler aws-ebs-csi aws-ccm.127 aws-ccm.128)
1818

1919
.PHONY: update-addon.calico
2020
update-addon.calico: ; $(info $(M) updating calico manifests)
@@ -36,6 +36,6 @@ update-addon.cluster-autoscaler: ; $(info $(M) updating cluster-autoscaler manif
3636
update-addon.aws-ebs-csi: ; $(info $(M) updating aws ebs csi manifests)
3737
./hack/addons/update-aws-ebs-csi.sh
3838

39-
.PHONY: update-addon.aws-cpi.%
40-
update-addon.aws-cpi.%: ; $(info $(M) updating aws cpi $* manifests)
41-
./hack/addons/update-aws-cpi.sh $(AWS_CPI_VERSION_$*) $(AWS_CPI_CHART_VERSION_$*)
39+
.PHONY: update-addon.aws-ccm.%
40+
update-addon.aws-ccm.%: ; $(info $(M) updating aws ccm $* manifests)
41+
./hack/addons/update-aws-ccm.sh $(AWS_CCM_VERSION_$*) $(AWS_CCM_CHART_VERSION_$*)

0 commit comments

Comments
 (0)