Skip to content

Commit 6c7c0c1

Browse files
authored
Merge pull request #7984 from toredash/fix/vpa-autoscaler-flags-link
chore(release-process): update flags and flags link
2 parents 13dba17 + 9bcecb9 commit 6c7c0c1

File tree

3 files changed

+15
-4
lines changed

3 files changed

+15
-4
lines changed

vertical-pod-autoscaler/RELEASE.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -122,12 +122,18 @@ sure nothing we care about will break if we do.
122122
1. [ ] Update information about newest version and K8s compatibility in
123123
[the installation section of README](https://github.com/kubernetes/autoscaler/blob/master/vertical-pod-autoscaler/README.md#installation).
124124
125-
1. [ ] Update the yaml files:
125+
1. [ ] Update the yaml and sh files:
126126
127127
```sh
128-
sed -i -s "s|[0-9]\+\.[0-9]\+\.[0-9]\+|[*vpa-version*]|" ./deploy/*-deployment*.yaml ./hack/vpa-process-yaml.sh
128+
sed -i -s "s|[0-9]\+\.[0-9]\+\.[0-9]\+|[*vpa-version*]|g" ./deploy/*-deployment*.yaml
129+
sed -i -s "s|DEFAULT_TAG=\"[0-9]\+\.[0-9]\+\.[0-9]\+\"|DEFAULT_TAG=\"[*vpa-version*]\"|g" ./hack/*.sh
130+
```
131+
132+
1. [ ] Generate the flags files:
133+
134+
```sh
135+
./hack/generate-flags.sh
129136
```
130-
1. [ ] Update the default tag in [vpa-up.sh](https://github.com/kubernetes/autoscaler/blob/master/vertical-pod-autoscaler/hack/vpa-up.sh).
131137
132138
1. [ ] Merge these changes into branch vpa-release-1.{$minor} and optionally into master if 1.{$minor} is the latest minor release
133139
(example PR: [#5460](https://github.com/kubernetes/autoscaler/pull/5460)).

vertical-pod-autoscaler/docs/flags.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# Vertical Pod Autoscaler Flags
22
This document contains the flags for all VPA components.
33

4+
To view the most recent _release_ of flags for all VPA components, consult the release tag [flags(1.3.0)](https://github.com/kubernetes/autoscaler/blob/vertical-pod-autoscaler-1.3.0/vertical-pod-autoscaler/docs/flags.md) documentation.
5+
46
> **Note:** This document is auto-generated from the default branch (master) of the VPA repository.
57
68
# What are the parameters to VPA admission-controller?

vertical-pod-autoscaler/hack/generate-flags.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ set -o pipefail
2121
SCRIPT_ROOT=$(realpath $(dirname "${BASH_SOURCE[0]}"))/..
2222
TARGET_FILE="${SCRIPT_ROOT}/docs/flags.md"
2323
COMPONENTS=("admission-controller" "recommender" "updater")
24+
DEFAULT_TAG="1.3.0"
2425

2526
# Function to extract flags from a binary
2627
extract_flags() {
@@ -42,7 +43,7 @@ extract_flags() {
4243
if [[ $line == *"-v, --v Level"* ]]; then
4344
# Special handling for the -v, --v Level flag
4445
flag="v"
45-
default=$(echo "$line" | sed -n 's/.*default: \([0-9]\+\).*/\1/p')
46+
default=$(echo "$line" | sed -n 's/.*default: \([0-9]\{1,\}\).*/\1/p')
4647
description="Set the log level verbosity"
4748
else
4849
flag=$(echo "$line" | awk '{print $1}' | sed 's/^-*//;s/=.*$//')
@@ -75,6 +76,8 @@ echo "Generating flags documentation..."
7576
echo "# Vertical Pod Autoscaler Flags"
7677
echo "This document contains the flags for all VPA components."
7778
echo
79+
echo "To view the most recent _release_ of flags for all VPA components, consult the release tag [flags($DEFAULT_TAG)](https://github.com/kubernetes/autoscaler/blob/vertical-pod-autoscaler-$DEFAULT_TAG/vertical-pod-autoscaler/docs/flags.md) documentation."
80+
echo
7881
echo "> **Note:** This document is auto-generated from the default branch (master) of the VPA repository."
7982
echo
8083

0 commit comments

Comments
 (0)