diff --git a/pkg/cmd/server/config.go b/pkg/cmd/server/config.go index 027cbcca0d07..c8577d2b3817 100644 --- a/pkg/cmd/server/config.go +++ b/pkg/cmd/server/config.go @@ -44,9 +44,6 @@ type Config struct { MasterPublicAddr flagtypes.Addr KubernetesPublicAddr flagtypes.Addr - ImageFormat string - LatestReleaseImages bool - ImageTemplate variable.ImageTemplate Hostname string diff --git a/pkg/cmd/server/origin/config.go b/pkg/cmd/server/origin/config.go index f04493160170..e308615acf88 100644 --- a/pkg/cmd/server/origin/config.go +++ b/pkg/cmd/server/origin/config.go @@ -27,7 +27,6 @@ import ( authorizationetcd "github.com/openshift/origin/pkg/authorization/registry/etcd" "github.com/openshift/origin/pkg/authorization/rulevalidation" osclient "github.com/openshift/origin/pkg/client" - "github.com/openshift/origin/pkg/cmd/util/variable" oauthetcd "github.com/openshift/origin/pkg/oauth/registry/etcd" projectauth "github.com/openshift/origin/pkg/project/auth" ) @@ -71,6 +70,9 @@ type MasterConfigParameters struct { MasterAuthorizationNamespace string + // a function that returns the appropriate image to use for a named component + ImageFor func(component string) string + // kubeClient is the client used to call Kubernetes APIs from system components, built from KubeClientConfig. // It should only be accessed via the *Client() helper methods. // To apply different access control to a system component, create a separate client/config specifically for that component. @@ -107,9 +109,6 @@ type MasterConfig struct { AdmissionControl admission.Interface - // a function that returns the appropriate image to use for a named component - ImageFor func(component string) string - TLS bool } @@ -118,8 +117,6 @@ func BuildMasterConfig(configParams MasterConfigParameters) (*MasterConfig, erro policyCache := configParams.newPolicyCache() requestContextMapper := kapi.NewRequestContextMapper() - imageTemplate := variable.NewDefaultImageTemplate() - config := &MasterConfig{ MasterConfigParameters: configParams, @@ -134,8 +131,6 @@ func BuildMasterConfig(configParams MasterConfigParameters) (*MasterConfig, erro AdmissionControl: admit.NewAlwaysAdmit(), - ImageFor: imageTemplate.ExpandOrDie, - TLS: strings.HasPrefix(configParams.MasterAddr, "https://"), } diff --git a/pkg/cmd/server/origin_master.go b/pkg/cmd/server/origin_master.go index afb78cf9a9a0..8f1d1807e9ce 100644 --- a/pkg/cmd/server/origin_master.go +++ b/pkg/cmd/server/origin_master.go @@ -110,6 +110,8 @@ func (cfg Config) BuildOriginMasterConfig() (*origin.MasterConfig, error) { OSClient: openshiftClient, OSClientConfig: *openshiftClientConfig, DeployerOSClientConfig: *deployerClientConfig, + + ImageFor: cfg.ImageTemplate.ExpandOrDie, } openshiftConfig, err := origin.BuildMasterConfig(openshiftConfigParameters) if err != nil { diff --git a/pkg/cmd/server/start.go b/pkg/cmd/server/start.go index 917ba58a6677..27b4c2801db8 100644 --- a/pkg/cmd/server/start.go +++ b/pkg/cmd/server/start.go @@ -94,6 +94,8 @@ func (cfg Config) startMaster() error { // TODO: recording should occur in individual components record.StartRecording(openshiftConfig.KubeClient().Events(""), kapi.EventSource{Component: "master"}) + glog.Infof("Using images from %q", openshiftConfig.ImageFor("")) + openshiftConfig.RunAssetServer() openshiftConfig.RunBuildController() openshiftConfig.RunBuildImageChangeTriggerController()