Skip to content

Commit 68ab166

Browse files
committed
Use existing external names for config
1 parent 2d2601a commit 68ab166

File tree

4 files changed

+6
-4
lines changed

4 files changed

+6
-4
lines changed

pkg/quota/admission/runonceduration/admission_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ func TestRunOnceDurationAdmit(t *testing.T) {
159159
func TestReadConfig(t *testing.T) {
160160
configStr := `apiVersion: v1
161161
kind: RunOnceDurationConfig
162-
activeDeadlineSecondsLimit: 3600
162+
activeDeadlineSecondsOverride: 3600
163163
`
164164
buf := bytes.NewBufferString(configStr)
165165
config, err := readConfig(buf)

pkg/quota/admission/runonceduration/api/types.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,5 @@ type RunOnceDurationConfig struct {
1919

2020
// ActiveDeadlineSecondsLimitAnnotation can be set on a project to limit the number of
2121
// seconds that a run-once pod can be active in that project
22-
const ActiveDeadlineSecondsLimitAnnotation = "openshift.io/active-deadline-seconds-limit"
22+
// TODO: this label needs to change to reflect its function. It's a limit, not an override.
23+
const ActiveDeadlineSecondsLimitAnnotation = "openshift.io/active-deadline-seconds-override"

pkg/quota/admission/runonceduration/api/v1/swagger_doc.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ package v1
77

88
var map_RunOnceDurationConfig = map[string]string{
99
"": "RunOnceDurationConfig is the configuration for the RunOnceDuration plugin. It specifies a maximum value for ActiveDeadlineSeconds for a run-once pod. The project that contains the pod may specify a different setting. That setting will take precedence over the one configured for the plugin here.",
10-
"activeDeadlineSecondsLimit": "ActiveDeadlineSecondsLimit is the maximum value to set on containers of run-once pods Only a positive value is valid. Absence of a value means that the plugin won't make any changes to the pod",
10+
"activeDeadlineSecondsOverride": "ActiveDeadlineSecondsLimit is the maximum value to set on containers of run-once pods Only a positive value is valid. Absence of a value means that the plugin won't make any changes to the pod",
1111
}
1212

1313
func (RunOnceDurationConfig) SwaggerDoc() map[string]string {

pkg/quota/admission/runonceduration/api/v1/types.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,6 @@ type RunOnceDurationConfig struct {
1414
// ActiveDeadlineSecondsLimit is the maximum value to set on containers of run-once pods
1515
// Only a positive value is valid. Absence of a value means that the plugin
1616
// won't make any changes to the pod
17-
ActiveDeadlineSecondsLimit *int64 `json:"activeDeadlineSecondsLimit,omitempty",description:"maximum value for activeDeadlineSeconds in run-once pods"`
17+
// TODO: change the external name of this field to reflect that it is a limit, not an override
18+
ActiveDeadlineSecondsLimit *int64 `json:"activeDeadlineSecondsOverride,omitempty",description:"maximum value for activeDeadlineSeconds in run-once pods"`
1819
}

0 commit comments

Comments
 (0)