Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[release-0.3/#222] pkg/apis, helm: update balloons config/CRD. #230

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
13 changes: 12 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ allclean: clean clean-cache

test: test-gopkgs

verify: verify-godeps verify-fmt
verify: verify-godeps verify-fmt verify-generate

#
# build targets
Expand Down Expand Up @@ -372,6 +372,17 @@ verify-fmt:
exit 1; \
fi

verify-generate: generate
$(Q) git diff --quiet; ec="$$?"; \
if [ "$$ec" != "0" ]; then \
echo "ERROR: generated artifacts are not up-to-date."; \
echo "ERROR:"; \
git --no-pager diff | sed 's/^/ERROR: /g'; \
echo "ERROR:"; \
echo "ERROR: please run 'make generate' and commit these changes."; \
exit "$$ec"; \
fi

#
# targets for installing dependencies
#
Expand Down
7 changes: 6 additions & 1 deletion config/crd/bases/config.nri_balloonspolicies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,12 @@ spec:
items:
type: string
type: array
preferCloseToDevices:
description: 'PreferCloseToDevices: prefer creating new balloons
of this type close to listed devices.'
items:
type: string
type: array
preferNewBalloons:
description: 'PreferNewBalloons: prefer creating new balloons
over adding containers to existing balloons. The default is
Expand Down Expand Up @@ -297,7 +303,6 @@ spec:
description: Reserved (CPU) resources for kube-system namespace.
type: object
required:
- idleCPUClass
- reservedResources
type: object
status:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,8 @@ spec:
type: string
type: array
preferCloseToDevices:
description: prefer creating new balloons of this type close to listed devices.
description: 'PreferCloseToDevices: prefer creating new balloons
of this type close to listed devices.'
items:
type: string
type: array
Expand Down Expand Up @@ -302,7 +303,6 @@ spec:
description: Reserved (CPU) resources for kube-system namespace.
type: object
required:
- idleCPUClass
- reservedResources
type: object
status:
Expand Down
8 changes: 5 additions & 3 deletions pkg/apis/config/v1alpha1/resmgr/policy/balloons/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ type Config struct {
PinMemory *bool `json:"pinMemory,omitempty"`
// IdleCpuClass controls how unusded CPUs outside any a
// balloons are (re)configured.
IdleCpuClass string `json:"idleCPUClass",omitempty"`
IdleCpuClass string `json:"idleCPUClass,omitempty"`
// ReservedPoolNamespaces is a list of namespace globs that
// will be allocated to reserved CPUs.
ReservedPoolNamespaces []string `json:"reservedPoolNamespaces,omitempty"`
Expand Down Expand Up @@ -185,10 +185,12 @@ type BalloonDef struct {
ShareIdleCpusInSame CPUTopologyLevel `json:"shareIdleCPUsInSame,omitempty"`
// PreferCloseToDevices: prefer creating new balloons of this
// type close to listed devices.
PreferCloseToDevices []string `json:"preferCloseToDevices",omitempty`
PreferCloseToDevices []string `json:"preferCloseToDevices,omitempty"`
// PreferFarFromDevices: prefer creating new balloons of this
// type far from listed devices.
PreferFarFromDevices []string `json:"preferFarFromDevices",omitempty`
// TODO: PreferFarFromDevices is considered too untested for usage. Hence,
// for the time being we prevent its usage through CRDs.
PreferFarFromDevices []string `json:"-"`
}

// String stringifies a BalloonDef
Expand Down

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