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
6 changes: 3 additions & 3 deletions pkg/apps/apis/apps/v1/defaults_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ func TestDefaults(t *testing.T) {
DNSPolicy: kapiv1.DNSClusterFirst,
Containers: []kapiv1.Container{
{
Name: "test",
Name: "test",
TerminationMessagePath: "/dev/termination-log",
TerminationMessagePolicy: kapiv1.TerminationMessageReadFile,
// The pull policy will be "PullAlways" only when the
Expand Down Expand Up @@ -392,7 +392,7 @@ func TestDefaults(t *testing.T) {
Spec: kapiv1.PodSpec{
Containers: []kapiv1.Container{
{
Name: "first",
Name: "first",
TerminationMessagePath: "/dev/termination-log",
TerminationMessagePolicy: kapiv1.TerminationMessageReadFile,
ImagePullPolicy: kapiv1.PullIfNotPresent,
Expand Down Expand Up @@ -464,7 +464,7 @@ func TestDefaults(t *testing.T) {
Spec: kapiv1.PodSpec{
Containers: []kapiv1.Container{
{
Name: "first",
Name: "first",
TerminationMessagePath: "/dev/termination-log",
TerminationMessagePolicy: kapiv1.TerminationMessageReadFile,
ImagePullPolicy: kapiv1.PullIfNotPresent,
Expand Down
2 changes: 1 addition & 1 deletion pkg/apps/apis/apps/validation/validation_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ func TestValidateDeploymentConfigMissingFields(t *testing.T) {
Triggers: manualTrigger(),
Selector: appstest.OkSelector(),
Strategy: appsapi.DeploymentStrategy{
Type: appsapi.DeploymentStrategyTypeCustom,
Type: appsapi.DeploymentStrategyTypeCustom,
ActiveDeadlineSeconds: mkint64p(3600),
},
Template: appstest.OkPodTemplate(),
Expand Down
4 changes: 2 additions & 2 deletions pkg/apps/strategy/support/lifecycle_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ func TestHookExecutor_makeHookPod(t *testing.T) {
Labels: map[string]string{
"openshift.io/deployer-pod.type": "hook",
appsv1.DeployerPodForDeploymentLabel: deploymentName,
"label1": "value1",
"label1": "value1",
},
Annotations: map[string]string{
appsv1.DeploymentAnnotation: deploymentName,
Expand Down Expand Up @@ -437,7 +437,7 @@ func TestHookExecutor_makeHookPod(t *testing.T) {
},
strategyLabels: map[string]string{
appsv1.DeployerPodForDeploymentLabel: "ignoredValue",
"label1": "value1",
"label1": "value1",
},
strategyAnnotations: map[string]string{"annotation2": "value2"},
},
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

36 changes: 18 additions & 18 deletions pkg/autoscaling/admission/runonceduration/admission_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,27 +67,27 @@ func TestRunOnceDurationAdmit(t *testing.T) {
expectedActiveDeadlineSeconds *int64
}{
{
name: "expect globally configured duration to be set",
config: testConfig(int64p(10)),
pod: testRunOncePod(),
name: "expect globally configured duration to be set",
config: testConfig(int64p(10)),
pod: testRunOncePod(),
expectedActiveDeadlineSeconds: int64p(10),
},
{
name: "empty config, no duration to be set",
config: testConfig(nil),
pod: testRunOncePod(),
name: "empty config, no duration to be set",
config: testConfig(nil),
pod: testRunOncePod(),
expectedActiveDeadlineSeconds: nil,
},
{
name: "expect configured duration to not limit lower existing duration",
config: testConfig(int64p(10)),
pod: testRunOncePodWithDuration(5),
name: "expect configured duration to not limit lower existing duration",
config: testConfig(int64p(10)),
pod: testRunOncePodWithDuration(5),
expectedActiveDeadlineSeconds: int64p(5),
},
{
name: "expect empty config to not limit existing duration",
config: testConfig(nil),
pod: testRunOncePodWithDuration(5),
name: "expect empty config to not limit existing duration",
config: testConfig(nil),
pod: testRunOncePodWithDuration(5),
expectedActiveDeadlineSeconds: int64p(5),
},
{
Expand Down Expand Up @@ -118,15 +118,15 @@ func TestRunOnceDurationAdmit(t *testing.T) {
expectedActiveDeadlineSeconds: int64p(1000),
},
{
name: "make no change to a pod that is not a run-once pod",
config: testConfig(int64p(10)),
pod: testRestartAlwaysPod(),
name: "make no change to a pod that is not a run-once pod",
config: testConfig(int64p(10)),
pod: testRestartAlwaysPod(),
expectedActiveDeadlineSeconds: nil,
},
{
name: "update a pod that has a RestartOnFailure policy",
config: testConfig(int64p(10)),
pod: testRestartOnFailurePod(),
name: "update a pod that has a RestartOnFailure policy",
config: testConfig(int64p(10)),
pod: testRestartOnFailurePod(),
expectedActiveDeadlineSeconds: int64p(10),
},
}
Expand Down
8 changes: 4 additions & 4 deletions pkg/build/apiserver/registry/buildconfig/webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -164,10 +164,10 @@ func (w *WebHookHandler) ProcessWebHook(writer http.ResponseWriter, req *http.Re
buildTriggerCauses := webhook.GenerateBuildTriggerInfo(revision, hookType)

request := &buildv1.BuildRequest{
TriggeredBy: buildTriggerCauses,
ObjectMeta: metav1.ObjectMeta{Name: name},
Revision: revision,
Env: envvars,
TriggeredBy: buildTriggerCauses,
ObjectMeta: metav1.ObjectMeta{Name: name},
Revision: revision,
Env: envvars,
DockerStrategyOptions: dockerStrategyOptions,
}

Expand Down
2 changes: 1 addition & 1 deletion pkg/build/controller/build/build_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1673,7 +1673,7 @@ func mockBuild(phase buildv1.BuildPhase, output buildv1.BuildOutput) *buildv1.Bu
buildutil.BuildConfigAnnotation: "test-bc",
},
Labels: map[string]string{
"name": "dataBuild",
"name": "dataBuild",
buildutil.BuildRunPolicyLabel: string(buildv1.BuildRunPolicyParallel),
buildutil.BuildConfigLabel: "test-bc",
},
Expand Down
2 changes: 1 addition & 1 deletion pkg/build/controller/common/util_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ func mockBuild(name string, phase buildv1.BuildPhase, stamp *metav1.Time) buildv
Namespace: "namespace",
CreationTimestamp: *stamp,
Labels: map[string]string{
"app": appName[0],
"app": appName[0],
buildutil.BuildConfigLabel: fmt.Sprintf("%v-build", appName[0]),
"buildconfig": fmt.Sprintf("%v-build", appName[0]),
},
Expand Down
16 changes: 8 additions & 8 deletions pkg/build/controller/strategy/docker.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,10 @@ func (bs *DockerBuildStrategy) CreateBuildPod(build *buildv1.Build, additionalCA
// (also if it's a docker type build, we should always have a dockerfile to manage)
if build.Spec.Source.Git != nil || build.Spec.Source.Binary != nil {
gitCloneContainer := v1.Container{
Name: GitCloneContainer,
Image: bs.Image,
Command: []string{"openshift-git-clone"},
Env: copyEnvVarSlice(containerEnv),
Name: GitCloneContainer,
Image: bs.Image,
Command: []string{"openshift-git-clone"},
Env: copyEnvVarSlice(containerEnv),
TerminationMessagePolicy: v1.TerminationMessageFallbackToLogsOnError,
VolumeMounts: []v1.VolumeMount{
{
Expand Down Expand Up @@ -166,10 +166,10 @@ func (bs *DockerBuildStrategy) CreateBuildPod(build *buildv1.Build, additionalCA
}
pod.Spec.InitContainers = append(pod.Spec.InitContainers,
v1.Container{
Name: "manage-dockerfile",
Image: bs.Image,
Command: []string{"openshift-manage-dockerfile"},
Env: copyEnvVarSlice(containerEnv),
Name: "manage-dockerfile",
Image: bs.Image,
Command: []string{"openshift-manage-dockerfile"},
Env: copyEnvVarSlice(containerEnv),
TerminationMessagePolicy: v1.TerminationMessageFallbackToLogsOnError,
VolumeMounts: []v1.VolumeMount{
{
Expand Down
16 changes: 8 additions & 8 deletions pkg/build/controller/strategy/sti.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,10 +120,10 @@ func (bs *SourceBuildStrategy) CreateBuildPod(build *buildv1.Build, additionalCA

if build.Spec.Source.Git != nil || build.Spec.Source.Binary != nil {
gitCloneContainer := corev1.Container{
Name: GitCloneContainer,
Image: bs.Image,
Command: []string{"openshift-git-clone"},
Env: copyEnvVarSlice(containerEnv),
Name: GitCloneContainer,
Image: bs.Image,
Command: []string{"openshift-git-clone"},
Env: copyEnvVarSlice(containerEnv),
TerminationMessagePolicy: corev1.TerminationMessageFallbackToLogsOnError,
VolumeMounts: []corev1.VolumeMount{
{
Expand Down Expand Up @@ -171,10 +171,10 @@ func (bs *SourceBuildStrategy) CreateBuildPod(build *buildv1.Build, additionalCA
}
pod.Spec.InitContainers = append(pod.Spec.InitContainers,
corev1.Container{
Name: "manage-dockerfile",
Image: bs.Image,
Command: []string{"openshift-manage-dockerfile"},
Env: copyEnvVarSlice(containerEnv),
Name: "manage-dockerfile",
Image: bs.Image,
Command: []string{"openshift-manage-dockerfile"},
Env: copyEnvVarSlice(containerEnv),
TerminationMessagePolicy: corev1.TerminationMessageFallbackToLogsOnError,
VolumeMounts: []corev1.VolumeMount{
{
Expand Down
6 changes: 3 additions & 3 deletions pkg/build/generator/generator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1035,7 +1035,7 @@ func TestGenerateBuildWithImageTagForSourceStrategyImageRepository(t *testing.T)
ObjectMeta: metav1.ObjectMeta{Name: imageRepoName},
Status: imagev1.ImageStreamStatus{
DockerImageRepository: originalImage,
Tags: is.Status.Tags,
Tags: is.Status.Tags,
},
}, nil
},
Expand Down Expand Up @@ -1106,7 +1106,7 @@ func TestGenerateBuildWithImageTagForDockerStrategyImageRepository(t *testing.T)
ObjectMeta: metav1.ObjectMeta{Name: imageRepoName},
Status: imagev1.ImageStreamStatus{
DockerImageRepository: originalImage,
Tags: is.Status.Tags,
Tags: is.Status.Tags,
},
}, nil
},
Expand Down Expand Up @@ -1176,7 +1176,7 @@ func TestGenerateBuildWithImageTagForCustomStrategyImageRepository(t *testing.T)
ObjectMeta: metav1.ObjectMeta{Name: imageRepoName},
Status: imagev1.ImageStreamStatus{
DockerImageRepository: originalImage,
Tags: is.Status.Tags,
Tags: is.Status.Tags,
},
}, nil
},
Expand Down
2 changes: 1 addition & 1 deletion pkg/build/generator/test/mocks.go
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ func MockImageStream(repoName, dockerImageRepo string, tags map[string]string) *
},
Status: imagev1.ImageStreamStatus{
DockerImageRepository: dockerImageRepo,
Tags: tagHistory,
Tags: tagHistory,
},
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,8 @@ func (c *completedConfig) withAppsAPIServer(delegateAPIServer genericapiserver.D
GenericConfig: &genericapiserver.RecommendedConfig{Config: *c.GenericConfig.Config, SharedInformerFactory: c.GenericConfig.SharedInformerFactory},
ExtraConfig: oappsapiserver.ExtraConfig{
KubeAPIServerClientConfig: c.ExtraConfig.KubeAPIServerClientConfig,
Codecs: legacyscheme.Codecs,
Scheme: legacyscheme.Scheme,
Codecs: legacyscheme.Codecs,
Scheme: legacyscheme.Scheme,
},
}
config := cfg.Complete()
Expand Down Expand Up @@ -211,8 +211,8 @@ func (c *completedConfig) withBuildAPIServer(delegateAPIServer genericapiserver.
GenericConfig: &genericapiserver.RecommendedConfig{Config: *c.GenericConfig.Config, SharedInformerFactory: c.GenericConfig.SharedInformerFactory},
ExtraConfig: buildapiserver.ExtraConfig{
KubeAPIServerClientConfig: c.ExtraConfig.KubeAPIServerClientConfig,
Codecs: legacyscheme.Codecs,
Scheme: legacyscheme.Scheme,
Codecs: legacyscheme.Codecs,
Scheme: legacyscheme.Scheme,
},
}
config := cfg.Complete()
Expand All @@ -233,9 +233,9 @@ func (c *completedConfig) withImageAPIServer(delegateAPIServer genericapiserver.
RegistryHostnameRetriever: c.ExtraConfig.RegistryHostnameRetriever,
AllowedRegistriesForImport: c.ExtraConfig.AllowedRegistriesForImport,
MaxImagesBulkImportedPerRepository: c.ExtraConfig.MaxImagesBulkImportedPerRepository,
Codecs: legacyscheme.Codecs,
Scheme: legacyscheme.Scheme,
AdditionalTrustedCA: c.ExtraConfig.AdditionalTrustedCA,
Codecs: legacyscheme.Codecs,
Scheme: legacyscheme.Scheme,
AdditionalTrustedCA: c.ExtraConfig.AdditionalTrustedCA,
},
}
config := cfg.Complete()
Expand Down Expand Up @@ -377,8 +377,8 @@ func (c *completedConfig) withTemplateAPIServer(delegateAPIServer genericapiserv
GenericConfig: &genericapiserver.RecommendedConfig{Config: *c.GenericConfig.Config, SharedInformerFactory: c.GenericConfig.SharedInformerFactory},
ExtraConfig: templateapiserver.ExtraConfig{
KubeAPIServerClientConfig: c.ExtraConfig.KubeAPIServerClientConfig,
Codecs: legacyscheme.Codecs,
Scheme: legacyscheme.Scheme,
Codecs: legacyscheme.Codecs,
Scheme: legacyscheme.Scheme,
},
}
config := cfg.Complete()
Expand Down
4 changes: 2 additions & 2 deletions pkg/cmd/server/admin/create_kubeconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ func (o CreateKubeConfigOptions) CreateKubeConfig() (*clientcmdapi.Config, error

clusters := make(map[string]*clientcmdapi.Cluster)
clusters[clusterNick] = &clientcmdapi.Cluster{
Server: o.APIServerURL,
Server: o.APIServerURL,
CertificateAuthorityData: caData,
}

Expand All @@ -205,7 +205,7 @@ func (o CreateKubeConfigOptions) CreateKubeConfig() (*clientcmdapi.Config, error
publicContextNick := config.GetContextNickname(o.ContextNamespace, publicClusterNick, userNick)

clusters[publicClusterNick] = &clientcmdapi.Cluster{
Server: o.PublicAPIServerURL,
Server: o.PublicAPIServerURL,
CertificateAuthorityData: caData,
}
contexts[publicContextNick] = &clientcmdapi.Context{Cluster: publicClusterNick, AuthInfo: userNick, Namespace: o.ContextNamespace}
Expand Down
2 changes: 1 addition & 1 deletion pkg/cmd/server/apis/config/validation/master_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ func TestValidateAdmissionPluginConfig(t *testing.T) {
{
config: map[string]*configapi.AdmissionPluginConfig{
"openshift.io/OriginResourceQuota": &configOnly,
"two": &configOnly,
"two": &configOnly,
},
warningFields: []string{"[openshift.io/OriginResourceQuota]"},
expectError: false,
Expand Down
Loading