summaryrefslogtreecommitdiffstats
path: root/cloudify/types/kubernetes.yaml
blob: 1698aa210e3ca62f82de3482eb17b3294dc10eca (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
inputs:

  join_command:
    type: string

  labels:
    default:
      app: { get_input: app_name }

  kubernetes_master_ip:
    type: string

  kubernetes_master_agent_user:
    default: { get_input: agent_user }

node_types:

  cloudify.nodes.Kubernetes.Node:
    derived_from: cloudify.nodes.Root
    interfaces:
      cloudify.interfaces.lifecycle:
        create:
          implementation: cloudify/scripts/create.py
        configure:
          implementation: cloudify/scripts/configure_node.py
          inputs:
            join_command:
              default: { get_input: join_command }
        start:
          implementation: fabric.fabric_plugin.tasks.run_task
          inputs:
            tasks_file:
              default: cloudify/scripts/tasks.py
            task_name:
              default: label_node
            task_properties:
              default:
                hostname: { get_attribute: [ SELF, hostname ] }
                labels: { get_input: labels }
            fabric_env:
              default:
                host_string: { get_input: kubernetes_master_ip }
                user: { get_input: kubernetes_master_agent_user }
                key: { get_secret: agent_key_private }
#        stop:
#          implementation: fabric.fabric_plugin.tasks.run_task
#          inputs:
#            tasks_file:
#              default: cloudify/scripts/tasks.py
#            task_name:
#              default: stop_node
#            task_properties:
#              default:
#                hostname: { get_attribute: [ SELF, hostname ] }
#            fabric_env:
#              default:
#                host_string: { get_input: kubernetes_master_ip }
#                user: { get_input: kubernetes_master_agent_user }
#                key: { get_secret: agent_key_private }
        delete:
          implementation: fabric.fabric_plugin.tasks.run_task
          inputs:
            tasks_file:
              default: cloudify/scripts/tasks.py
            task_name:
              default: delete_node
            task_properties:
              default:
                hostname: { get_attribute: [ SELF, hostname ] }
            fabric_env:
              default:
                host_string: { get_input: kubernetes_master_ip }
                user: { get_input: kubernetes_master_agent_user }
                key: { get_secret: agent_key_private }

  cloudify.kubernetes.resources.Namespace:
    derived_from: cloudify.kubernetes.resources.Main
    properties:
      _api_mapping:
        default:
          create:
            api: CoreV1Api
            method: create_namespace
            payload: V1Namespace
          read:
            api: CoreV1Api
            method: read_namespace
          delete:
            api: CoreV1Api
            method: delete_namespace
            payload: V1DeleteOptions