Skip to content

Commit

Permalink
Switch to GA types for workloads, rbac
Browse files Browse the repository at this point in the history
  • Loading branch information
liggitt committed Nov 27, 2019
1 parent fedebf7 commit 47d5c01
Show file tree
Hide file tree
Showing 24 changed files with 45 additions and 38 deletions.
2 changes: 1 addition & 1 deletion addon-resizer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ data:
apiVersion: nannyconfig/v1alpha1
kind: NannyConfiguration
---
apiVersion: extensions/v1beta1
apiVersion: apps/v1
kind: Deployment
metadata:
name: nanny-v1
Expand Down
4 changes: 2 additions & 2 deletions cluster-autoscaler/cloudprovider/alicloud/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ curl http://aliacs-k8s-cn-hangzhou.oss-cn-hangzhou.aliyuncs.com/public/pkg/run/a

#### Use access-key-id and access-key-secret
```yaml
apiVersion: extensions/v1beta1
apiVersion: apps/v1
kind: Deployment
metadata:
name: cluster-autoscaler
Expand Down Expand Up @@ -136,7 +136,7 @@ spec:
#### Use STS with RAM Role
```yaml
apiVersion: extensions/v1beta1
apiVersion: apps/v1
kind: Deployment
metadata:
name: cluster-autoscaler
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ metadata:
name: cluster-autoscaler
namespace: kube-system
---
apiVersion: rbac.authorization.k8s.io/v1beta1
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: cluster-autoscaler
Expand Down Expand Up @@ -49,7 +49,7 @@ rules:
verbs: ["watch","list","get"]

---
apiVersion: rbac.authorization.k8s.io/v1beta1
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: cluster-autoscaler
Expand All @@ -67,7 +67,7 @@ rules:
verbs: ["delete","get","update","watch"]

---
apiVersion: rbac.authorization.k8s.io/v1beta1
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: cluster-autoscaler
Expand All @@ -84,7 +84,7 @@ subjects:
namespace: kube-system

---
apiVersion: rbac.authorization.k8s.io/v1beta1
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: cluster-autoscaler
Expand Down Expand Up @@ -113,7 +113,7 @@ data:
region-id: [YOUR_BASE64_REGION_ID]

---
apiVersion: extensions/v1beta1
apiVersion: apps/v1
kind: Deployment
metadata:
name: cluster-autoscaler
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ metadata:
name: cluster-autoscaler-azure
namespace: kube-system
---
apiVersion: extensions/v1beta1
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ metadata:
name: cluster-autoscaler-azure
namespace: kube-system
---
apiVersion: extensions/v1beta1
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ metadata:
name: cluster-autoscaler-azure
namespace: kube-system
---
apiVersion: extensions/v1beta1
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ metadata:
name: cluster-autoscaler-azure
namespace: kube-system
---
apiVersion: extensions/v1beta1
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ metadata:
name: cluster-autoscaler-azure
namespace: kube-system
---
apiVersion: extensions/v1beta1
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ metadata:
name: cluster-autoscaler-azure
namespace: kube-system
---
apiVersion: extensions/v1beta1
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ metadata:
name: cluster-autoscaler-azure
namespace: kube-system
---
apiVersion: extensions/v1beta1
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ metadata:
name: cluster-autoscaler-azure
namespace: kube-system
---
apiVersion: extensions/v1beta1
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
apiVersion: rbac.authorization.k8s.io/v1beta1
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: cluster-autoscaler-role
Expand Down Expand Up @@ -48,7 +48,7 @@ rules:
resourceNames: ["cluster-autoscaler-status", "cluster-autoscaler-priority-expander"]
verbs: ["delete", "get", "update"]
---
apiVersion: rbac.authorization.k8s.io/v1beta1
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: cluster-autoscaler-rolebinding
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
apiVersion: rbac.authorization.k8s.io/v1beta1
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: cluster-autoscaler-role
Expand Down Expand Up @@ -48,7 +48,7 @@ rules:
resourceNames: ["cluster-autoscaler-status", "cluster-autoscaler-priority-expander"]
verbs: ["delete", "get", "update"]
---
apiVersion: rbac.authorization.k8s.io/v1beta1
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: cluster-autoscaler-rolebinding
Expand Down
4 changes: 2 additions & 2 deletions vertical-pod-autoscaler/MIGRATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ metadata:
name: hamster-vpa
spec:
targetRef:
apiVersion: "extensions/v1beta1"
apiVersion: "apps/v1"
kind: Deployment
name: hamster
```
Expand Down Expand Up @@ -73,7 +73,7 @@ spec:
# Note the empty selector field - this is needed to remove previously defined selector
selector:
targetRef:
apiVersion: "extensions/v1beta1"
apiVersion: "apps/v1"
kind: "Deployment"
name: "<deployment_name>" # This matches the deployment name
```
Expand Down
14 changes: 8 additions & 6 deletions vertical-pod-autoscaler/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Vertical Pod Autoscaler

## Contents
- [Intro](#intro)
- [Installation](#installation)
- [Contents](#contents)
- [Notice on removal of v1beta1 version (>=0.5.0)](#notice-on-removal-of-v1beta1-version-050)
- [Prerequisites](#prerequisites)
- [Install command](#install-command)
- [Quick start](#quick-start)
Expand All @@ -11,9 +11,11 @@
- [Troubleshooting](#troubleshooting)
- [Components of VPA](#components-of-vpa)
- [Tear down](#tear-down)
- [Known limitations](#known-limitations)
- [Limitations of beta version](#limitations-of-beta-version)
- [Related Links](#related-links)
- [Examples](#examples)
- [Keeping limit proportional to request](#keeping-limit-proportional-to-request)
- [Capping to Limit Range](#capping-to-limit-range)
- [Resource Policy Overriding Limit Range](#resource-policy-overriding-limit-range)
- [Limitations of beta version](#limitations-of-beta-version)

# Intro

Expand Down Expand Up @@ -155,7 +157,7 @@ metadata:
name: my-app-vpa
spec:
targetRef:
apiVersion: "extensions/v1beta1"
apiVersion: "apps/v1"
kind: Deployment
name: my-app
updatePolicy:
Expand Down
1 change: 1 addition & 0 deletions vertical-pod-autoscaler/deploy/vpa-rbac.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ metadata:
name: system:evictioner
rules:
- apiGroups:
- "apps"
- "extensions"
resources:
- replicasets
Expand Down
4 changes: 2 additions & 2 deletions vertical-pod-autoscaler/e2e/v1/autoscaling_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,9 @@ var (
// KindRC var
KindRC = schema.GroupVersionKind{Version: "v1", Kind: "ReplicationController"}
// KindDeployment var
KindDeployment = schema.GroupVersionKind{Group: "apps", Version: "v1beta2", Kind: "Deployment"}
KindDeployment = schema.GroupVersionKind{Group: "apps", Version: "v1", Kind: "Deployment"}
// KindReplicaSet var
KindReplicaSet = schema.GroupVersionKind{Group: "apps", Version: "v1beta2", Kind: "ReplicaSet"}
KindReplicaSet = schema.GroupVersionKind{Group: "apps", Version: "v1", Kind: "ReplicaSet"}
subresource = "scale"
)

Expand Down
2 changes: 1 addition & 1 deletion vertical-pod-autoscaler/e2e/v1/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ const (
)

var hamsterTargetRef = &autoscaling.CrossVersionObjectReference{
APIVersion: "extensions/v1beta1",
APIVersion: "apps/v1",
Kind: "Deployment",
Name: "hamster-deployment",
}
Expand Down
2 changes: 1 addition & 1 deletion vertical-pod-autoscaler/e2e/v1/full_vpa.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ var _ = FullVpaE2eDescribe("Pods under VPA", func() {
gomega.Expect(err).NotTo(gomega.HaveOccurred())

vpaCRD = NewVPA(f, "hamster-vpa", &autoscaling.CrossVersionObjectReference{
APIVersion: "extensions/v1beta1",
APIVersion: "apps/v1",
Kind: "Deployment",
Name: "hamster",
})
Expand Down
4 changes: 2 additions & 2 deletions vertical-pod-autoscaler/e2e/v1beta2/autoscaling_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,9 @@ var (
// KindRC var
KindRC = schema.GroupVersionKind{Version: "v1", Kind: "ReplicationController"}
// KindDeployment var
KindDeployment = schema.GroupVersionKind{Group: "apps", Version: "v1beta2", Kind: "Deployment"}
KindDeployment = schema.GroupVersionKind{Group: "apps", Version: "v1", Kind: "Deployment"}
// KindReplicaSet var
KindReplicaSet = schema.GroupVersionKind{Group: "apps", Version: "v1beta2", Kind: "ReplicaSet"}
KindReplicaSet = schema.GroupVersionKind{Group: "apps", Version: "v1", Kind: "ReplicaSet"}
subresource = "scale"
)

Expand Down
2 changes: 1 addition & 1 deletion vertical-pod-autoscaler/e2e/v1beta2/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ const (
)

var hamsterTargetRef = &autoscaling.CrossVersionObjectReference{
APIVersion: "extensions/v1beta1",
APIVersion: "apps/v1",
Kind: "Deployment",
Name: "hamster-deployment",
}
Expand Down
2 changes: 1 addition & 1 deletion vertical-pod-autoscaler/e2e/v1beta2/full_vpa.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ var _ = FullVpaE2eDescribe("Pods under VPA", func() {
gomega.Expect(err).NotTo(gomega.HaveOccurred())

vpaCRD = NewVPA(f, "hamster-vpa", &autoscaling.CrossVersionObjectReference{
APIVersion: "extensions/v1beta1",
APIVersion: "apps/v1",
Kind: "Deployment",
Name: "hamster",
})
Expand Down
4 changes: 3 additions & 1 deletion vertical-pod-autoscaler/examples/redis-deprecated.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,12 @@ spec:
matchLabels:
app: redis
---
apiVersion: apps/v1beta2 # for versions before 1.8.0 use apps/v1beta1
apiVersion: apps/v1
kind: Deployment
metadata:
name: redis-master
labels:
app: redis
spec:
selector:
matchLabels:
Expand Down
4 changes: 3 additions & 1 deletion vertical-pod-autoscaler/examples/redis.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,12 @@ spec:
kind: Deployment
name: redis-master
---
apiVersion: apps/v1 # for versions before 1.8.0 use apps/v1beta1
apiVersion: apps/v1
kind: Deployment
metadata:
name: redis-master
labels:
app: redis
spec:
selector:
matchLabels:
Expand Down

0 comments on commit 47d5c01

Please sign in to comment.