File tree 3 files changed +7
-7
lines changed 3 files changed +7
-7
lines changed Original file line number Diff line number Diff line change 16
16
17
17
import yaml
18
18
19
- from kubernetes import client , utils , config
20
-
19
+ from kubernetes import client , config , utils
21
20
22
21
def main ():
23
22
# Configs can be set in Configuration class directly or using helper
@@ -26,5 +25,6 @@ def main():
26
25
config .load_kube_config ()
27
26
k8s_api = utils .create_from_yaml ("nginx-deployment.yaml" )
28
27
28
+
29
29
if __name__ == '__main__' :
30
30
main ()
Original file line number Diff line number Diff line change @@ -27,16 +27,16 @@ def test_app_yaml(self):
27
27
k8s_api = utils .create_from_yaml (
28
28
"kubernetes/e2e_test/test_yaml/app.yaml" ,
29
29
configuration = self .config )
30
- self .assertEqual ("apps/v1 " ,
30
+ self .assertEqual ("apps/v1beta1 " ,
31
31
k8s_api .get_api_resources ().group_version )
32
32
deployments = k8s_api .list_namespaced_deployment (
33
33
namespace = "default" ).items
34
34
deployment_name = []
35
35
for item in deployments :
36
36
deployment_name .append (item .metadata .name )
37
- self .assertIn ("nginx-deployment- app" , deployment_name )
37
+ self .assertIn ("nginx-app" , deployment_name )
38
38
resp = k8s_api .delete_namespaced_deployment (
39
- name = "nginx-deployment- app" , namespace = "default" ,
39
+ name = "nginx-app" , namespace = "default" ,
40
40
body = {})
41
41
42
42
def test_extension_yaml (self ):
Original file line number Diff line number Diff line change 1
- apiVersion : apps/v1
1
+ apiVersion : apps/v1beta1
2
2
kind : Deployment
3
3
metadata :
4
- name : nginx-deployment- app
4
+ name : nginx-app
5
5
labels :
6
6
app : nginx
7
7
spec :
You can’t perform that action at this time.
0 commit comments