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: 6 additions & 0 deletions charts/agent-stack-k8s/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,12 @@
"title": "Permits PodSpecPatch to modify the command or args fields of containers. See the warning in the README before enabling this option",
"examples": [false]
},
"experimental-job-reservation-support": {
"type": "boolean",
"default": false,
"title": "Experimental - does not fully function yet. This experiment enables job reservation support for better job observability and scalable job fetching. If you try it, please let us know about your experiences by filing an issue on https://github.com/buildkite/agent-stack-k8s",
"examples": [false]
},
"workspaceVolume": {
"$ref": "https://kubernetesjsonschema.dev/master/_definitions.json#/definitions/io.k8s.api.core.v1.Volume"
},
Expand Down
5 changes: 5 additions & 0 deletions cmd/controller/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,11 @@ func AddConfigFlags(cmd *cobra.Command) {
false,
"Permits PodSpecPatch to modify the command or args fields of stack-provided containers. See the warning in the README before enabling this option",
)
cmd.Flags().Bool(
"experimental-job-reservation-support",
false,
"Please contact us before enabling this flag. This feature enables job reservation support: Better job observability, scalable job fetching!",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah... I had meant to remind you to update this text to be consistent with the JSON schema.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops quick follow up: #647

)
cmd.Flags().Int(
"pagination-page-size",
config.DefaultPaginationPageSize,
Expand Down
4 changes: 4 additions & 0 deletions internal/controller/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,9 @@ type Config struct {
// then the pod will malfunction.
AllowPodSpecPatchUnsafeCmdMod bool `json:"allow-pod-spec-patch-unsafe-command-modification" validate:"omitempty"`

// Enable job reservation support - this feature is in-progress.
ExperimentalJobReservationSupport bool `json:"experimental-job-reservation-support" validate:"omitempty"`

// These are only used for integration tests.
BuildkiteToken string `json:"buildkite-token" validate:"omitempty"`
GraphQLEndpoint string `json:"graphql-endpoint" validate:"omitempty"`
Expand Down Expand Up @@ -138,6 +141,7 @@ func (c Config) MarshalLogObject(enc zapcore.ObjectEncoder) error {
enc.AddUint16("prometheus-port", c.PrometheusPort)
enc.AddBool("prohibit-kubernetes-plugin", c.ProhibitKubernetesPlugin)
enc.AddBool("allow-pod-spec-patch-unsafe-command-modification", c.AllowPodSpecPatchUnsafeCmdMod)
enc.AddBool("experimental-job-reservation-support", c.ExperimentalJobReservationSupport)
if err := enc.AddArray("additional-redacted-vars", c.AdditionalRedactedVars); err != nil {
return err
}
Expand Down