Skip to content

Commit

Permalink
Upgrade deprecated k8s apiversion (microsoft#4132)
Browse files Browse the repository at this point in the history
* Upgrade deprecated k8s apiversion

Upgrade deprecated k8s apiversion "extensions/v1beta1" to "apps/v1".
Reference:
https://kubernetes.io/blog/2019/07/18/api-deprecations-in-1-16/

* Fix broken spec

Fix broken daemon set spec.
  • Loading branch information
abuccts authored Jan 14, 2020
1 parent f12510f commit 5bcb91a
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 5 deletions.
1 change: 0 additions & 1 deletion src/device-plugin/config/device-plugin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,3 @@ service_type: "k8s"

devices:
- "nvidia.com/gpu"
- "rdma/hca"
5 changes: 4 additions & 1 deletion src/device-plugin/deploy/device-plugin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,15 @@ data:
]
}
---
apiVersion: extensions/v1beta1
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: k8s-host-device-plugin-daemonset
namespace: kube-system
spec:
selector:
matchLabels:
name: k8s-host-device-plugin-ds
template:
metadata:
annotations:
Expand Down
2 changes: 1 addition & 1 deletion src/device-plugin/deploy/start.sh.template
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ kubectl apply --overwrite=true -f device-plugin.yaml || exit $?
# NVIDIA GPU device plugin
{% if 'nvidia.com/gpu' in cluster_cfg['device-plugin']['devices'] %}

kubectl apply --overwrite=true -f https://raw.githubusercontent.com/NVIDIA/k8s-device-plugin/1.0.0-beta/nvidia-device-plugin.yml || exit $?
kubectl apply --overwrite=true -f https://raw.githubusercontent.com/NVIDIA/k8s-device-plugin/1.0.0-beta4/nvidia-device-plugin.yml || exit $?

{% endif %}

Expand Down
2 changes: 1 addition & 1 deletion src/fluentd/deploy/fluentd.yaml.template
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

kind: DaemonSet
apiVersion: extensions/v1beta1
apiVersion: apps/v1
metadata:
name: fluentd-ds
spec:
Expand Down
2 changes: 1 addition & 1 deletion src/watchdog/test/data/no_condtion_pod.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
},
"ownerReferences": [
{
"apiVersion": "extensions/v1beta1",
"apiVersion": "apps/v1",
"kind": "DaemonSet",
"name": "yarn-frameworklauncher-ds",
"uid": "b4918fda-8a77-11e8-a8fc-000d3ab25bb6",
Expand Down

0 comments on commit 5bcb91a

Please sign in to comment.