Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 2 additions & 2 deletions data/data/bootstrap/files/usr/local/bin/bootkube.sh.template
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ then
--asset-input-dir=/assets/tls \
--asset-output-dir=/assets/kube-apiserver-bootstrap \
--config-output-file=/assets/kube-apiserver-bootstrap/config \
--cluster-config-file=/assets/openshift/99_openshift-cluster-api_cluster.yaml
--cluster-config-file=/assets/manifests/cluster-network-02-config.yml

cp kube-apiserver-bootstrap/config /etc/kubernetes/bootstrap-configs/kube-apiserver-config.yaml
cp kube-apiserver-bootstrap/bootstrap-manifests/* bootstrap-manifests/
Expand All @@ -125,7 +125,7 @@ then
--asset-input-dir=/assets/tls \
--asset-output-dir=/assets/kube-controller-manager-bootstrap \
--config-output-file=/assets/kube-controller-manager-bootstrap/config \
--cluster-config-file=/assets/openshift/99_openshift-cluster-api_cluster.yaml
--cluster-config-file=/assets/manifests/cluster-network-02-config.yml

cp kube-controller-manager-bootstrap/config /etc/kubernetes/bootstrap-configs/kube-controller-manager-config.yaml
cp kube-controller-manager-bootstrap/bootstrap-manifests/* bootstrap-manifests/
Expand Down
63 changes: 0 additions & 63 deletions pkg/asset/manifests/cluster_k8s_io.go

This file was deleted.

26 changes: 0 additions & 26 deletions pkg/asset/manifests/network.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import (
"github.com/openshift/installer/pkg/asset/templates/content/openshift"

metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
clusterv1a1 "sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1"
)

var (
Expand Down Expand Up @@ -122,31 +121,6 @@ func (no *Networking) Files() []*asset.File {
return no.FileList
}

// ClusterNetwork returns the ClusterNetworkingConfig for the ClusterConfig
// object. This is called by ClusterK8sIO, which captures generalized cluster
// state but shouldn't need to be fully networking aware.
func (no *Networking) ClusterNetwork() (*clusterv1a1.ClusterNetworkingConfig, error) {
if no.Config == nil {
// should be unreachable.
return nil, errors.Errorf("ClusterNetwork called before initialization")
}

pods := []string{}
for _, cn := range no.Config.Spec.ClusterNetwork {
pods = append(pods, cn.CIDR)
}

cn := &clusterv1a1.ClusterNetworkingConfig{
Services: clusterv1a1.NetworkRanges{
CIDRBlocks: no.Config.Spec.ServiceNetwork,
},
Pods: clusterv1a1.NetworkRanges{
CIDRBlocks: pods,
},
}
return cn, nil
}

// Load returns false since this asset is not written to disk by the installer.
func (no *Networking) Load(f asset.FileFetcher) (bool, error) {
return false, nil
Expand Down
5 changes: 1 addition & 4 deletions pkg/asset/manifests/openshift.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ func (o *Openshift) Name() string {
func (o *Openshift) Dependencies() []asset.Asset {
return []asset.Asset{
&installconfig.InstallConfig{},
&ClusterK8sIO{},
&machines.Worker{},
&password.KubeadminPassword{},

Expand All @@ -55,9 +54,8 @@ func (o *Openshift) Dependencies() []asset.Asset {
func (o *Openshift) Generate(dependencies asset.Parents) error {
installConfig := &installconfig.InstallConfig{}
kubeadminPassword := &password.KubeadminPassword{}
clusterk8sio := &ClusterK8sIO{}
worker := &machines.Worker{}
dependencies.Get(installConfig, clusterk8sio, worker, kubeadminPassword)
dependencies.Get(installConfig, worker, kubeadminPassword)
var cloudCreds cloudCredsSecretData
platform := installConfig.Config.Platform.Name()
switch platform {
Expand Down Expand Up @@ -118,7 +116,6 @@ func (o *Openshift) Generate(dependencies asset.Parents) error {
assetData := map[string][]byte{
"99_binding-discovery.yaml": []byte(bindingDiscovery.Files()[0].Data),
"99_kubeadmin-password-secret.yaml": applyTemplateData(kubeadminPasswordSecret.Files()[0].Data, templateData),
"99_openshift-cluster-api_cluster.yaml": clusterk8sio.Raw,
"99_openshift-cluster-api_worker-machineset.yaml": worker.MachineSetRaw,
"99_openshift-cluster-api_worker-user-data-secret.yaml": worker.UserDataSecretRaw,
}
Expand Down