Skip to content

Commit

Permalink
Merge pull request #106 from banzaicloud/remove-old-k8s-version
Browse files Browse the repository at this point in the history
Remove deprecated k8s versions
  • Loading branch information
pbalogh-sa authored Jun 23, 2020
2 parents e420d8f + 89be01a commit 462671b
Show file tree
Hide file tree
Showing 8 changed files with 4 additions and 435 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ func TestWriteKubeadmConfig(t *testing.T) {
apiServerHostPort: "192.168.64.11:6443",
kubeletCertificateAuthority: "/etc/kubernetes/pki/ca.crt",
clusterName: "my-cluster",
kubernetesVersion: "1.14.0",
kubernetesVersion: "1.18.0",
serviceCIDR: "10.32.0.0/24",
podNetworkCIDR: "10.200.0.0/16",
cloudProvider: constants.CloudProviderAmazon,
Expand Down
9 changes: 1 addition & 8 deletions cmd/pke/app/phases/kubeadm/controlplane/kubeadm.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ import (
"github.com/pbnjay/memory"
)

//go:generate templify -t ${GOTMPL} -p controlplane -f kubeadmConfigV1Alpha3 kubeadm_v1alpha3.yaml.tmpl
//go:generate templify -t ${GOTMPL} -p controlplane -f kubeadmConfigV1Beta1 kubeadm_v1beta1.yaml.tmpl
//go:generate templify -t ${GOTMPL} -p controlplane -f kubeadmConfigV1Beta2 kubeadm_v1beta2.yaml.tmpl

Expand Down Expand Up @@ -64,16 +63,10 @@ func (c ControlPlane) WriteKubeadmConfig(out io.Writer, filename string) error {
}

encryptionProviderPrefix := ""
if ver.LessThan(semver.MustParse("1.13.0")) {
encryptionProviderPrefix = "experimental-"
}

var conf string
switch ver.Minor() {
case 12, 13:
// see https://godoc.org/k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm/v1alpha3
conf = kubeadmConfigV1Alpha3Template()
case 14, 15, 16, 17:
case 15, 16, 17:
// see https://godoc.org/k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm/v1beta1
conf = kubeadmConfigV1Beta1Template()
case 18:
Expand Down
161 changes: 0 additions & 161 deletions cmd/pke/app/phases/kubeadm/controlplane/kubeadm_v1alpha3.yaml.go

This file was deleted.

140 changes: 0 additions & 140 deletions cmd/pke/app/phases/kubeadm/controlplane/kubeadm_v1alpha3.yaml.tmpl

This file was deleted.

6 changes: 1 addition & 5 deletions cmd/pke/app/phases/kubeadm/node/kubeadm.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ import (
"github.com/pbnjay/memory"
)

//go:generate templify -t ${GOTMPL} -p node -f kubeadmConfigV1Alpha3 kubeadm_v1alpha3.yaml.tmpl
//go:generate templify -t ${GOTMPL} -p node -f kubeadmConfigV1Beta1 kubeadm_v1beta1.yaml.tmpl
//go:generate templify -t ${GOTMPL} -p node -f kubeadmConfigV1Beta2 kubeadm_v1beta2.yaml.tmpl

Expand Down Expand Up @@ -61,10 +60,7 @@ func (n Node) writeKubeadmConfig(out io.Writer, filename string) error {

var conf string
switch ver.Minor() {
case 12, 13:
// see https://godoc.org/k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm/v1alpha3
conf = kubeadmConfigV1Alpha3Template()
case 14, 15, 16, 17:
case 15, 16, 17:
// see https://godoc.org/k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm/v1beta1
conf = kubeadmConfigV1Beta1Template()
case 18:
Expand Down
Loading

0 comments on commit 462671b

Please sign in to comment.