Skip to content

Commit 176dd17

Browse files
Robert Baileymarkmandel
authored andcommitted
Promote autoscaling to v1 (agones-dev#874)
* Rename the autoscaling API from v1alpha1 -> v1. * Run `make gen-crd-client`. * Code updated for the new autoscaling import path. * Updates for the new autoscaling api version. * Force a rebuild of the build image. * Updated website docs. * Run `make gen-api-docs`.
1 parent 9f646bb commit 176dd17

45 files changed

Lines changed: 419 additions & 251 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎build/build-image/Dockerfile‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
# ForceUpdate 8 -- change here if you need to force a rebuild
15+
# ForceUpdate 9 -- change here if you need to force a rebuild
1616

1717
FROM debian:stretch
1818

‎build/build-image/gen-crd-client.sh‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,6 @@ rsync -r /go/src/agones.dev/agones/vendor/k8s.io/ /go/src/k8s.io/
2323
cd /go/src/k8s.io/code-generator
2424
./generate-groups.sh "all" \
2525
agones.dev/agones/pkg/client \
26-
agones.dev/agones/pkg/apis "allocation:v1alpha1 stable:v1alpha1 multicluster:v1alpha1 autoscaling:v1alpha1" \
26+
agones.dev/agones/pkg/apis "allocation:v1alpha1 stable:v1alpha1 multicluster:v1alpha1 autoscaling:v1" \
2727
--go-header-file=/go/src/agones.dev/agones/build/boilerplate.go.txt
2828

‎examples/autoscaler-webhook/main.go‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import (
2525
"os"
2626
"strconv"
2727

28-
"agones.dev/agones/pkg/apis/autoscaling/v1alpha1"
28+
autoscalingv1 "agones.dev/agones/pkg/apis/autoscaling/v1"
2929
"agones.dev/agones/pkg/util/runtime" // for the logger
3030
)
3131

@@ -136,7 +136,7 @@ func handleAutoscale(w http.ResponseWriter, r *http.Request) {
136136
return
137137
}
138138

139-
var faReq v1alpha1.FleetAutoscaleReview
139+
var faReq autoscalingv1.FleetAutoscaleReview
140140
res, err := ioutil.ReadAll(r.Body)
141141
if err != nil {
142142
http.Error(w, err.Error(), http.StatusInternalServerError)
@@ -146,7 +146,7 @@ func handleAutoscale(w http.ResponseWriter, r *http.Request) {
146146
if err != nil {
147147
http.Error(w, err.Error(), http.StatusInternalServerError)
148148
}
149-
faResp := v1alpha1.FleetAutoscaleResponse{
149+
faResp := autoscalingv1.FleetAutoscaleResponse{
150150
Scale: false,
151151
Replicas: faReq.Request.Status.Replicas,
152152
UID: faReq.Request.UID,
@@ -166,7 +166,7 @@ func handleAutoscale(w http.ResponseWriter, r *http.Request) {
166166
}
167167
}
168168
w.Header().Set("Content-Type", "application/json")
169-
review := &v1alpha1.FleetAutoscaleReview{
169+
review := &autoscalingv1.FleetAutoscaleReview{
170170
Request: faReq.Request,
171171
Response: &faResp,
172172
}

‎examples/fleetautoscaler.yaml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
# automatically depending on load
1818
#
1919

20-
apiVersion: "autoscaling.agones.dev/v1alpha1"
20+
apiVersion: "autoscaling.agones.dev/v1"
2121
kind: FleetAutoscaler
2222
metadata:
2323
# FleetAutoscaler Metadata

‎examples/simple-udp/fleetautoscaler.yaml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
# up and down depending on usage
1818
#
1919

20-
apiVersion: "autoscaling.agones.dev/v1alpha1"
20+
apiVersion: "autoscaling.agones.dev/v1"
2121
kind: FleetAutoscaler
2222
metadata:
2323
name: simple-udp-autoscaler

‎examples/webhookfleetautoscaler.yaml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
# Full example of a FleetAutoscaler - this is used to scale a Fleet
1717
# automatically depending on load
1818
#
19-
apiVersion: "autoscaling.agones.dev/v1alpha1"
19+
apiVersion: "autoscaling.agones.dev/v1"
2020
kind: FleetAutoscaler
2121
metadata:
2222
name: webhook-fleet-autoscaler
@@ -34,4 +34,4 @@ spec:
3434
path: scale
3535
# optional for URL defined webhooks
3636
# url: ""
37-
# caBundle: optional, used for HTTPS webhook type
37+
# caBundle: optional, used for HTTPS webhook type

‎examples/webhookfleetautoscalertls.yaml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
# Full example of a FleetAutoscaler - this is used to scale a Fleet
1717
# automatically depending on load
1818
#
19-
apiVersion: "autoscaling.agones.dev/v1alpha1"
19+
apiVersion: "autoscaling.agones.dev/v1"
2020
kind: FleetAutoscaler
2121
metadata:
2222
name: webhook-fleetautoscaler-tls

‎examples/xonotic/fleetautoscaler.yaml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
# up and down depending on usage
1818
#
1919

20-
apiVersion: "autoscaling.agones.dev/v1alpha1"
20+
apiVersion: "autoscaling.agones.dev/v1"
2121
kind: FleetAutoscaler
2222
metadata:
2323
name: xonotic-autoscaler

‎install/helm/agones/templates/crds/fleetautoscaler.yaml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ metadata:
2626
heritage: {{ .Release.Service }}
2727
spec:
2828
group: autoscaling.agones.dev
29-
version: v1alpha1
29+
version: v1
3030
scope: Namespaced
3131
names:
3232
kind: FleetAutoscaler

‎install/helm/agones/templates/extensions.yaml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ webhooks:
9292
resources:
9393
- "fleetautoscalers"
9494
apiVersions:
95-
- "v1alpha1"
95+
- "v1"
9696
operations:
9797
- CREATE
9898
- UPDATE

0 commit comments

Comments
 (0)