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

Promote autoscaling to v1 #874

Merged
merged 7 commits into from
Jul 9, 2019
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
2 changes: 1 addition & 1 deletion build/build-image/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

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

FROM debian:stretch

Expand Down
2 changes: 1 addition & 1 deletion build/build-image/gen-crd-client.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@ rsync -r /go/src/agones.dev/agones/vendor/k8s.io/ /go/src/k8s.io/
cd /go/src/k8s.io/code-generator
./generate-groups.sh "all" \
agones.dev/agones/pkg/client \
agones.dev/agones/pkg/apis "allocation:v1alpha1 stable:v1alpha1 multicluster:v1alpha1 autoscaling:v1alpha1" \
agones.dev/agones/pkg/apis "allocation:v1alpha1 stable:v1alpha1 multicluster:v1alpha1 autoscaling:v1" \
--go-header-file=/go/src/agones.dev/agones/build/boilerplate.go.txt

8 changes: 4 additions & 4 deletions examples/autoscaler-webhook/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import (
"os"
"strconv"

"agones.dev/agones/pkg/apis/autoscaling/v1alpha1"
autoscalingv1 "agones.dev/agones/pkg/apis/autoscaling/v1"
"agones.dev/agones/pkg/util/runtime" // for the logger
)

Expand Down Expand Up @@ -136,7 +136,7 @@ func handleAutoscale(w http.ResponseWriter, r *http.Request) {
return
}

var faReq v1alpha1.FleetAutoscaleReview
var faReq autoscalingv1.FleetAutoscaleReview
res, err := ioutil.ReadAll(r.Body)
if err != nil {
http.Error(w, err.Error(), http.StatusInternalServerError)
Expand All @@ -146,7 +146,7 @@ func handleAutoscale(w http.ResponseWriter, r *http.Request) {
if err != nil {
http.Error(w, err.Error(), http.StatusInternalServerError)
}
faResp := v1alpha1.FleetAutoscaleResponse{
faResp := autoscalingv1.FleetAutoscaleResponse{
Scale: false,
Replicas: faReq.Request.Status.Replicas,
UID: faReq.Request.UID,
Expand All @@ -166,7 +166,7 @@ func handleAutoscale(w http.ResponseWriter, r *http.Request) {
}
}
w.Header().Set("Content-Type", "application/json")
review := &v1alpha1.FleetAutoscaleReview{
review := &autoscalingv1.FleetAutoscaleReview{
Request: faReq.Request,
Response: &faResp,
}
Expand Down
2 changes: 1 addition & 1 deletion examples/fleetautoscaler.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# automatically depending on load
#

apiVersion: "autoscaling.agones.dev/v1alpha1"
apiVersion: "autoscaling.agones.dev/v1"
kind: FleetAutoscaler
metadata:
# FleetAutoscaler Metadata
Expand Down
2 changes: 1 addition & 1 deletion examples/simple-udp/fleetautoscaler.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# up and down depending on usage
#

apiVersion: "autoscaling.agones.dev/v1alpha1"
apiVersion: "autoscaling.agones.dev/v1"
kind: FleetAutoscaler
metadata:
name: simple-udp-autoscaler
Expand Down
4 changes: 2 additions & 2 deletions examples/webhookfleetautoscaler.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
# Full example of a FleetAutoscaler - this is used to scale a Fleet
# automatically depending on load
#
apiVersion: "autoscaling.agones.dev/v1alpha1"
apiVersion: "autoscaling.agones.dev/v1"
kind: FleetAutoscaler
metadata:
name: webhook-fleet-autoscaler
Expand All @@ -34,4 +34,4 @@ spec:
path: scale
# optional for URL defined webhooks
# url: ""
# caBundle: optional, used for HTTPS webhook type
# caBundle: optional, used for HTTPS webhook type
2 changes: 1 addition & 1 deletion examples/webhookfleetautoscalertls.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
# Full example of a FleetAutoscaler - this is used to scale a Fleet
# automatically depending on load
#
apiVersion: "autoscaling.agones.dev/v1alpha1"
apiVersion: "autoscaling.agones.dev/v1"
kind: FleetAutoscaler
metadata:
name: webhook-fleetautoscaler-tls
Expand Down
2 changes: 1 addition & 1 deletion examples/xonotic/fleetautoscaler.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# up and down depending on usage
#

apiVersion: "autoscaling.agones.dev/v1alpha1"
apiVersion: "autoscaling.agones.dev/v1"
kind: FleetAutoscaler
metadata:
name: xonotic-autoscaler
Expand Down
2 changes: 1 addition & 1 deletion install/helm/agones/templates/crds/fleetautoscaler.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ metadata:
heritage: {{ .Release.Service }}
spec:
group: autoscaling.agones.dev
version: v1alpha1
version: v1
scope: Namespaced
names:
kind: FleetAutoscaler
Expand Down
2 changes: 1 addition & 1 deletion install/helm/agones/templates/extensions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ webhooks:
resources:
- "fleetautoscalers"
apiVersions:
- "v1alpha1"
- "v1"
operations:
- CREATE
- UPDATE
Expand Down
4 changes: 2 additions & 2 deletions install/yaml/install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,7 @@ metadata:
heritage: Tiller
spec:
group: autoscaling.agones.dev
version: v1alpha1
version: v1
scope: Namespaced
names:
kind: FleetAutoscaler
Expand Down Expand Up @@ -1445,7 +1445,7 @@ webhooks:
resources:
- "fleetautoscalers"
apiVersions:
- "v1alpha1"
- "v1"
operations:
- CREATE
- UPDATE
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@

// +k8s:deepcopy-gen=package,register

// Package v1alpha1 is the v1alpha1 version of the API.
// Package v1 is the v1 version of the API.
// +groupName=autoscaling.agones.dev
package v1alpha1
package v1
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package v1alpha1
package v1

import (
"crypto/x509"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package v1alpha1
package v1

import (
"testing"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package v1alpha1
package v1

import (
"agones.dev/agones/pkg/apis/autoscaling"
Expand All @@ -23,7 +23,7 @@ import (
)

// SchemeGroupVersion is group version used to register these objects
var SchemeGroupVersion = schema.GroupVersion{Group: autoscaling.GroupName, Version: "v1alpha1"}
var SchemeGroupVersion = schema.GroupVersion{Group: autoscaling.GroupName, Version: "v1"}

// Kind takes an unqualified kind and returns back a Group qualified GroupKind
func Kind(kind string) schema.GroupKind {
Expand Down

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

24 changes: 12 additions & 12 deletions pkg/client/clientset/versioned/clientset.go

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

16 changes: 8 additions & 8 deletions pkg/client/clientset/versioned/fake/clientset_generated.go

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

4 changes: 2 additions & 2 deletions pkg/client/clientset/versioned/fake/register.go

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

4 changes: 2 additions & 2 deletions pkg/client/clientset/versioned/scheme/register.go

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

Loading