diff --git a/coordinator/cloudprovider/aws/ccm.go b/coordinator/cloudprovider/aws/ccm.go index 75e6171ac..9edac5f38 100644 --- a/coordinator/cloudprovider/aws/ccm.go +++ b/coordinator/cloudprovider/aws/ccm.go @@ -1,13 +1,18 @@ package aws -import "github.com/edgelesssys/constellation/coordinator/core" +import ( + "github.com/edgelesssys/constellation/coordinator/cloudprovider" + "github.com/edgelesssys/constellation/coordinator/core" + "github.com/edgelesssys/constellation/coordinator/kubernetes/k8sapi/resources" + k8s "k8s.io/api/core/v1" +) // CloudControllerManager holds the AWS cloud-controller-manager configuration. type CloudControllerManager struct{} // Image returns the container image used to provide cloud-controller-manager for the cloud-provider. func (c CloudControllerManager) Image() string { - return "us.gcr.io/k8s-artifacts-prod/provider-aws/cloud-controller-manager:v1.22.0-alpha.0" + return cloudprovider.CloudControllerManagerImageAWS } // Path returns the path used by cloud-controller-manager executable within the container image. @@ -20,6 +25,39 @@ func (c CloudControllerManager) Name() string { return "aws" } +// ExtraArgs returns a list of arguments to append to the cloud-controller-manager command. +func (c CloudControllerManager) ExtraArgs() []string { + return []string{} +} + +// ConfigMaps returns a list of ConfigMaps to deploy together with the k8s cloud-controller-manager +// Reference: https://kubernetes.io/docs/concepts/configuration/configmap/ . +func (c CloudControllerManager) ConfigMaps(instance core.Instance) (resources.ConfigMaps, error) { + return resources.ConfigMaps{}, nil +} + +// Secrets returns a list of secrets to deploy together with the k8s cloud-controller-manager. +// Reference: https://kubernetes.io/docs/concepts/configuration/secret/ . +func (c CloudControllerManager) Secrets(instance core.Instance, cloudServiceAccountURI string) (resources.Secrets, error) { + return resources.Secrets{}, nil +} + +// Volumes returns a list of volumes to deploy together with the k8s cloud-controller-manager. +// Reference: https://kubernetes.io/docs/concepts/storage/volumes/ . +func (c CloudControllerManager) Volumes() []k8s.Volume { + return []k8s.Volume{} +} + +// VolumeMounts a list of of volume mounts to deploy together with the k8s cloud-controller-manager. +func (c CloudControllerManager) VolumeMounts() []k8s.VolumeMount { + return []k8s.VolumeMount{} +} + +// Env returns a list of k8s environment key-value pairs to deploy together with the k8s cloud-controller-manager. +func (c CloudControllerManager) Env() []k8s.EnvVar { + return []k8s.EnvVar{} +} + // PrepareInstance is called on every instance before deploying the cloud-controller-manager. // Allows for cloud-provider specific hooks. func (c CloudControllerManager) PrepareInstance(instance core.Instance, vpnIP string) error { diff --git a/coordinator/cloudprovider/aws/cloudnodemanager.go b/coordinator/cloudprovider/aws/cloudnodemanager.go new file mode 100644 index 000000000..f62dc508f --- /dev/null +++ b/coordinator/cloudprovider/aws/cloudnodemanager.go @@ -0,0 +1,27 @@ +package aws + +// CloudNodeManager holds the AWS cloud-node-manager configuration. +type CloudNodeManager struct{} + +// Image returns the container image used to provide cloud-node-manager for the cloud-provider. +// Not used on AWS. +func (c *CloudNodeManager) Image() string { + return "" +} + +// Path returns the path used by cloud-node-manager executable within the container image. +// Not used on AWS. +func (c *CloudNodeManager) Path() string { + return "" +} + +// ExtraArgs returns a list of arguments to append to the cloud-node-manager command. +// Not used on AWS. +func (c *CloudNodeManager) ExtraArgs() []string { + return []string{} +} + +// Supported is used to determine if cloud node manager is implemented for this cloud provider. +func (c *CloudNodeManager) Supported() bool { + return false +} diff --git a/coordinator/cloudprovider/images.go b/coordinator/cloudprovider/images.go new file mode 100644 index 000000000..8ed47d18e --- /dev/null +++ b/coordinator/cloudprovider/images.go @@ -0,0 +1,6 @@ +package cloudprovider + +const ( + // CloudControllerManagerImageAWS is the CCM image used on AWS. + CloudControllerManagerImageAWS = "us.gcr.io/k8s-artifacts-prod/provider-aws/cloud-controller-manager:v1.22.0-alpha.0" +) diff --git a/coordinator/cmd/coordinator/main.go b/coordinator/cmd/coordinator/main.go index 1d7f5ceef..e800076d9 100644 --- a/coordinator/cmd/coordinator/main.go +++ b/coordinator/cmd/coordinator/main.go @@ -75,6 +75,7 @@ func main() { kube = kubernetes.New(&k8sapi.KubernetesUtil{}, &k8sapi.AWSConfiguration{}, kubectl.New()) metadata = awscloud.Metadata{} cloudControllerManager = awscloud.CloudControllerManager{} + cloudNodeManager = &awscloud.CloudNodeManager{} autoscaler = awscloud.Autoscaler{} bindIP = gvisorIP bindPort = defaultPort