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
3 changes: 0 additions & 3 deletions pkg/cmd/server/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,6 @@ type Config struct {
MasterPublicAddr flagtypes.Addr
KubernetesPublicAddr flagtypes.Addr

ImageFormat string
LatestReleaseImages bool

ImageTemplate variable.ImageTemplate

Hostname string
Expand Down
11 changes: 3 additions & 8 deletions pkg/cmd/server/origin/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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
}

Expand All @@ -118,8 +117,6 @@ func BuildMasterConfig(configParams MasterConfigParameters) (*MasterConfig, erro
policyCache := configParams.newPolicyCache()
requestContextMapper := kapi.NewRequestContextMapper()

imageTemplate := variable.NewDefaultImageTemplate()

config := &MasterConfig{
MasterConfigParameters: configParams,

Expand All @@ -134,8 +131,6 @@ func BuildMasterConfig(configParams MasterConfigParameters) (*MasterConfig, erro

AdmissionControl: admit.NewAlwaysAdmit(),

ImageFor: imageTemplate.ExpandOrDie,

TLS: strings.HasPrefix(configParams.MasterAddr, "https://"),
}

Expand Down
2 changes: 2 additions & 0 deletions pkg/cmd/server/origin_master.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 2 additions & 0 deletions pkg/cmd/server/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -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("<component>"))

openshiftConfig.RunAssetServer()
openshiftConfig.RunBuildController()
openshiftConfig.RunBuildImageChangeTriggerController()
Expand Down