Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rebrand Packet to Equinix Metal #1663

Merged
merged 25 commits into from
Dec 28, 2021
Merged
Show file tree
Hide file tree
Changes from 16 commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
9745c46
Rebrand Packet to Equinix Metal
ahmedwaleedmalik Dec 3, 2021
3275493
Revert unrequired changes
ahmedwaleedmalik Dec 3, 2021
1c494b7
Merge master
ahmedwaleedmalik Dec 3, 2021
0aebcdc
Refactored code
ahmedwaleedmalik Dec 3, 2021
bb591eb
Add missing conversion functions for v1beta1 API
ahmedwaleedmalik Dec 3, 2021
ba6de39
Fix environment variables for equinix metal
ahmedwaleedmalik Dec 6, 2021
299cf8e
Add migration for packet to equinix metal
ahmedwaleedmalik Dec 6, 2021
ecbcc1a
Update tests and generated code
ahmedwaleedmalik Dec 6, 2021
3f31dde
Add missinhg env variable PACKET_PROJECT_ID for MC
ahmedwaleedmalik Dec 6, 2021
ef966dc
Use preset-equinix-metal instead of preset-packet
ahmedwaleedmalik Dec 6, 2021
79fe342
refactor: be consistent with provider name for equinix metal
ahmedwaleedmalik Dec 7, 2021
f8dfc7d
fix(templates): fix generated resource index
ahmedwaleedmalik Dec 7, 2021
c455dab
Fix for cloud provider name for packet in machine deployment
ahmedwaleedmalik Dec 7, 2021
fbcb75d
refactor: make equnixmetal naming consistent
ahmedwaleedmalik Dec 8, 2021
67e070a
Merge master and resolve conflicts
ahmedwaleedmalik Dec 8, 2021
2ea37fb
docs: update generated documentation
ahmedwaleedmalik Dec 8, 2021
dbadd18
Add conversion for cloud providers in v1beta1
ahmedwaleedmalik Dec 23, 2021
cd1ec15
minor refactor
ahmedwaleedmalik Dec 23, 2021
ab23f8c
Update machine-controller to v1.40.0
xmudrii Dec 28, 2021
6196097
Support Packet to Equinix Metal migration
xmudrii Dec 28, 2021
10e372b
Support both new and old Equinix Metal Terraform configs
xmudrii Dec 28, 2021
e4d0c96
Support both PACKET_ and METAL_ credentials
xmudrii Dec 28, 2021
3b967e7
Replace credential secrets instead updating them
xmudrii Dec 28, 2021
2ab3154
Minor fixes
xmudrii Dec 28, 2021
7a0e159
Update machine-controller to v1.40.1
xmudrii Dec 28, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 23 additions & 23 deletions .prow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -664,15 +664,15 @@ presubmits:
requests:
cpu: 1
#########################################################
# E2E/Conformance tests (Packet, 1.19-1.22)
# E2E/Conformance tests (Equinix Metal, 1.19-1.22)
#########################################################
- name: pull-kubeone-e2e-packet-conformance-1.19
- name: pull-kubeone-e2e-equinix-metal-conformance-1.19
always_run: false
decorate: true
clone_uri: "ssh://git@github.com/kubermatic/kubeone.git"
labels:
preset-goproxy: "true"
preset-packet: "true"
preset-equinix-metal: "true"
spec:
containers:
- image: kubermatic/kubeone-e2e:v0.1.18
Expand All @@ -683,21 +683,21 @@ presubmits:
- e2e-test
env:
- name: PROVIDER
value: "packet"
value: "equinixmetal"
- name: TEST_CLUSTER_TARGET_VERSION
value: "1.19.14"
- name: KUBEONE_TEST_RUN
value: "TestClusterConformance"
resources:
requests:
cpu: 1
- name: pull-kubeone-e2e-packet-conformance-1.20
- name: pull-kubeone-e2e-equinix-metal-conformance-1.20
always_run: false
decorate: true
clone_uri: "ssh://git@github.com/kubermatic/kubeone.git"
labels:
preset-goproxy: "true"
preset-packet: "true"
preset-equinix-metal: "true"
spec:
containers:
- image: kubermatic/kubeone-e2e:v0.1.18
Expand All @@ -708,21 +708,21 @@ presubmits:
- e2e-test
env:
- name: PROVIDER
value: "packet"
value: "equinixmetal"
- name: TEST_CLUSTER_TARGET_VERSION
value: "1.20.10"
- name: KUBEONE_TEST_RUN
value: "TestClusterConformance"
resources:
requests:
cpu: 1
- name: pull-kubeone-e2e-packet-conformance-1.21
- name: pull-kubeone-e2e-equinix-metal-conformance-1.21
always_run: false
decorate: true
clone_uri: "ssh://git@github.com/kubermatic/kubeone.git"
labels:
preset-goproxy: "true"
preset-packet: "true"
preset-equinix-metal: "true"
spec:
containers:
- image: kubermatic/kubeone-e2e:v0.1.18
Expand All @@ -733,21 +733,21 @@ presubmits:
- e2e-test
env:
- name: PROVIDER
value: "packet"
value: "equinixmetal"
- name: TEST_CLUSTER_TARGET_VERSION
value: "1.21.4"
- name: KUBEONE_TEST_RUN
value: "TestClusterConformance"
resources:
requests:
cpu: 1
- name: pull-kubeone-e2e-packet-conformance-1.22
- name: pull-kubeone-e2e-equinix-metal-conformance-1.22
always_run: false
decorate: true
clone_uri: "ssh://git@github.com/kubermatic/kubeone.git"
labels:
preset-goproxy: "true"
preset-packet: "true"
preset-equinix-metal: "true"
spec:
containers:
- image: kubermatic/kubeone-e2e:v0.1.18
Expand All @@ -758,7 +758,7 @@ presubmits:
- e2e-test
env:
- name: PROVIDER
value: "packet"
value: "equinixmetal"
- name: CONTAINER_RUNTIME
value: containerd
- name: TEST_CLUSTER_TARGET_VERSION
Expand Down Expand Up @@ -1246,15 +1246,15 @@ presubmits:
- name: TF_VAR_project
value: "kubeone-terraform-test"
#########################################################
# E2E/Upgrade tests (Packet)
# E2E/Upgrade tests (Equinix Metal)
#########################################################
- name: pull-kubeone-e2e-packet-upgrade-1.19-1.20
- name: pull-kubeone-e2e-equinix-metal-upgrade-1.19-1.20
always_run: false
decorate: true
clone_uri: "ssh://git@github.com/kubermatic/kubeone.git"
labels:
preset-goproxy: "true"
preset-packet: "true"
preset-equinix-metal: "true"
spec:
containers:
- image: kubermatic/kubeone-e2e:v0.1.18
Expand All @@ -1265,7 +1265,7 @@ presubmits:
- e2e-test
env:
- name: PROVIDER
value: "packet"
value: "equinixmetal"
- name: TEST_CLUSTER_INITIAL_VERSION
value: "1.19.14"
- name: TEST_CLUSTER_TARGET_VERSION
Expand All @@ -1274,13 +1274,13 @@ presubmits:
valut: "120m"
- name: KUBEONE_TEST_RUN
value: "TestClusterUpgrade"
- name: pull-kubeone-e2e-packet-upgrade-1.20-1.21
- name: pull-kubeone-e2e-equinix-metal-upgrade-1.20-1.21
always_run: false
decorate: true
clone_uri: "ssh://git@github.com/kubermatic/kubeone.git"
labels:
preset-goproxy: "true"
preset-packet: "true"
preset-equinix-metal: "true"
spec:
containers:
- image: kubermatic/kubeone-e2e:v0.1.18
Expand All @@ -1291,7 +1291,7 @@ presubmits:
- e2e-test
env:
- name: PROVIDER
value: "packet"
value: "equinixmetal"
- name: TEST_CLUSTER_INITIAL_VERSION
value: "1.20.10"
- name: TEST_CLUSTER_TARGET_VERSION
Expand All @@ -1300,13 +1300,13 @@ presubmits:
valut: "120m"
- name: KUBEONE_TEST_RUN
value: "TestClusterUpgrade"
- name: pull-kubeone-e2e-packet-upgrade-1.21-1.22
- name: pull-kubeone-e2e-equinix-metal-upgrade-1.21-1.22
always_run: false
decorate: true
clone_uri: "ssh://git@github.com/kubermatic/kubeone.git"
labels:
preset-goproxy: "true"
preset-packet: "true"
preset-equinix-metal: "true"
spec:
containers:
- image: kubermatic/kubeone-e2e:v0.1.18
Expand All @@ -1317,7 +1317,7 @@ presubmits:
- e2e-test
env:
- name: PROVIDER
value: "packet"
value: "equinixmetal"
- name: CONTAINER_RUNTIME
value: containerd
- name: TEST_CLUSTER_INITIAL_VERSION
Expand Down
173 changes: 173 additions & 0 deletions addons/ccm-equinixmetal/ccm-equinixmetal.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,173 @@
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: equinixmetal-cloud-controller-manager
namespace: kube-system
labels:
app: equinixmetal-cloud-controller-manager
spec:
replicas: 1
selector:
matchLabels:
app: equinixmetal-cloud-controller-manager
template:
metadata:
labels:
app: equinixmetal-cloud-controller-manager
spec:
dnsPolicy: Default
hostNetwork: true
serviceAccountName: cloud-controller-manager
priorityClassName: system-cluster-critical
tolerations:
# this taint is set by all kubelets running `--cloud-provider=external`
# so we should tolerate it to schedule the Equinix Metal ccm
- key: "node.cloudprovider.kubernetes.io/uninitialized"
value: "true"
effect: "NoSchedule"
- key: "CriticalAddonsOnly"
operator: "Exists"
# cloud controller manager should be able to run on masters
- key: "node-role.kubernetes.io/master"
effect: NoSchedule
operator: Exists
- key: "node-role.kubernetes.io/control-plane"
effect: NoSchedule
operator: Exists
containers:
- image: {{ .InternalImages.Get "EquinixMetalCCM" }}
name: cloud-provider-equinix-metal
imagePullPolicy: Always
command:
- "./cloud-provider-equinix-metal"
- "--cloud-provider=equinixmetal"
- "--leader-elect=false"
- "--authentication-skip-lookup=true"
- "--provider-config=/etc/cloud-sa/cloud-sa.json"
resources:
requests:
cpu: 100m
memory: 50Mi
volumeMounts:
- name: cloud-sa-volume
readOnly: true
mountPath: "/etc/cloud-sa"
volumes:
- name: cloud-sa-volume
secret:
secretName: metal-cloud-config
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: cloud-controller-manager
namespace: kube-system
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
annotations:
rbac.authorization.kubernetes.io/autoupdate: "true"
name: system:cloud-controller-manager
rules:
- apiGroups:
# reason: so ccm can read the information about the kube-system namespace
- ""
resources:
- namespaces
verbs:
- get
- apiGroups:
# reason: so ccm can monitor and update endpoints, used for control plane loadbalancer
- ""
resources:
- endpoints
verbs:
- create
- get
- list
- watch
- update
- apiGroups:
# reason: so ccm can read and update nodes and annotations
- ""
resources:
- nodes
verbs:
- "*"
- apiGroups:
# reason: so ccm can update the status of nodes
- ""
resources:
- nodes/status
verbs:
- patch
- apiGroups:
# reason: so ccm can manage services for loadbalancer
- ""
resources:
- services
verbs:
- get
- list
- patch
- update
- watch
- create
- apiGroups:
# reason: so ccm can update the status of services for loadbalancer
- ""
resources:
- services/status
verbs:
- list
- patch
- update
- watch
- apiGroups:
# reason: so ccm can read and update configmap/metallb-system:config
- ""
resources:
- configmaps
verbs:
- create
- get
- list
- watch
- update
- patch
- apiGroups:
# reason: so ccm can read and update events
- ""
resources:
- events
verbs:
- create
- get
- list
- watch
- update
- patch
---
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: system:cloud-controller-manager
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: system:cloud-controller-manager
subjects:
- kind: ServiceAccount
name: cloud-controller-manager
namespace: kube-system
---
kind: Secret
apiVersion: v1
metadata:
name: metal-cloud-config
namespace: kube-system
data:
cloud-sa.json:
{{ EquinixMetalSecret .Credentials.METAL_AUTH_TOKEN .Credentials.METAL_PROJECT_ID | b64enc }}
Loading