Initial kube-up support for VMware's Photon Controller
This is for: https://github.com/kubernetes/kubernetes/issues/24121 Photon Controller is an open-source cloud management platform. More information is available at: http://vmware.github.io/photon-controller/ This commit provides initial support for Photon Controller. The following features are tested and working: - kube-up and kube-down - Basic pod and service management - Networking within the Kubernetes cluster - UI and DNS addons It has been tested with a Kubernetes cluster of up to 10 nodes. Further work on scaling is planned for the near future. Internally we have implemented continuous integration testing and will run it multiple times per day against the Kubernetes master branch once this is integrated so we can quickly react to problems. A few things have not yet been implemented, but are planned: - Support for kube-push - Support for test-build-release, test-setup, test-teardown Assuming this is accepted for inclusion, we will write documentation for the kubernetes.io site. We have included a script to help users configure Photon Controller for use with Kubernetes. While not required, it will help some users get started more quickly. It will be documented. We are aware of the kube-deploy efforts and will track them and support them as appropriate.
This commit is contained in:
@@ -47,7 +47,7 @@ docker:
|
||||
- pkg: docker-io
|
||||
|
||||
{% endif %}
|
||||
{% elif grains.cloud is defined and grains.cloud == 'vsphere' and grains.os == 'Debian' and grains.osrelease_info[0] >=8 %}
|
||||
{% elif grains.cloud is defined and grains.cloud in ['vsphere', 'photon-controller'] and grains.os == 'Debian' and grains.osrelease_info[0] >=8 %}
|
||||
|
||||
{% if pillar.get('is_systemd') %}
|
||||
|
||||
@@ -69,6 +69,7 @@ docker:
|
||||
environment_file: {{ environment_file }}
|
||||
- require:
|
||||
- file: /opt/kubernetes/helpers/docker-prestart
|
||||
- pkg: docker-engine
|
||||
|
||||
# The docker service.running block below doesn't work reliably
|
||||
# Instead we run our script which e.g. does a systemd daemon-reload
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
{% if grains.cloud == 'aws' %}
|
||||
{% set cert_ip='_use_aws_external_ip_' %}
|
||||
{% endif %}
|
||||
{% if grains.cloud == 'vsphere' %}
|
||||
{% if grains.cloud == 'vsphere' or grains.cloud == 'photon-controller' %}
|
||||
{% set cert_ip=grains.ip_interfaces.eth0[0] %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{% if grains.cloud is defined %}
|
||||
{% if grains.cloud in ['aws', 'gce', 'vagrant', 'vsphere'] %}
|
||||
{% if grains.cloud in ['aws', 'gce', 'vagrant', 'vsphere', 'photon-controller'] %}
|
||||
# TODO: generate and distribute tokens on other cloud providers.
|
||||
/srv/kubernetes/known_tokens.csv:
|
||||
file.managed:
|
||||
@@ -12,7 +12,7 @@
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
{% if grains['cloud'] is defined and grains.cloud in [ 'aws', 'gce', 'vagrant' ,'vsphere'] %}
|
||||
{% if grains['cloud'] is defined and grains.cloud in [ 'aws', 'gce', 'vagrant' ,'vsphere', 'photon-controller'] %}
|
||||
/srv/kubernetes/basic_auth.csv:
|
||||
file.managed:
|
||||
- source: salt://kube-apiserver/basic_auth.csv
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
{% set srv_sshproxy_path = "/srv/sshproxy" -%}
|
||||
|
||||
{% if grains.cloud is defined -%}
|
||||
{% if grains.cloud not in ['vagrant', 'vsphere'] -%}
|
||||
{% if grains.cloud not in ['vagrant', 'vsphere', 'photon-controller'] -%}
|
||||
{% set cloud_provider = "--cloud-provider=" + grains.cloud -%}
|
||||
{% endif -%}
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
{% set client_ca_file = "" -%}
|
||||
|
||||
{% set secure_port = "6443" -%}
|
||||
{% if grains['cloud'] is defined and grains.cloud in [ 'aws', 'gce', 'vagrant', 'vsphere' ] %}
|
||||
{% if grains['cloud'] is defined and grains.cloud in [ 'aws', 'gce', 'vagrant', 'vsphere', 'photon-controller' ] %}
|
||||
{% set secure_port = "443" -%}
|
||||
{% set client_ca_file = "--client-ca-file=/srv/kubernetes/ca.crt" -%}
|
||||
{% endif -%}
|
||||
@@ -72,12 +72,12 @@
|
||||
{% endif -%}
|
||||
|
||||
{% if grains.cloud is defined -%}
|
||||
{% if grains.cloud in [ 'aws', 'gce', 'vagrant', 'vsphere' ] -%}
|
||||
{% if grains.cloud in [ 'aws', 'gce', 'vagrant', 'vsphere', 'photon-controller' ] -%}
|
||||
{% set token_auth_file = "--token-auth-file=/srv/kubernetes/known_tokens.csv" -%}
|
||||
{% endif -%}
|
||||
{% endif -%}
|
||||
|
||||
{% if grains['cloud'] is defined and grains.cloud in [ 'aws', 'gce', 'vagrant', 'vsphere'] %}
|
||||
{% if grains['cloud'] is defined and grains.cloud in [ 'aws', 'gce', 'vagrant', 'vsphere', 'photon-controller' ] %}
|
||||
{% set basic_auth_file = "--basic-auth-file=/srv/kubernetes/basic_auth.csv" -%}
|
||||
{% endif -%}
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
{% set srv_kube_path = "/srv/kubernetes" -%}
|
||||
|
||||
{% if grains.cloud is defined -%}
|
||||
{% if grains.cloud not in ['vagrant', 'vsphere'] -%}
|
||||
{% if grains.cloud not in ['vagrant', 'vsphere', 'photon-controller'] -%}
|
||||
{% set cloud_provider = "--cloud-provider=" + grains.cloud -%}
|
||||
{% endif -%}
|
||||
{% set service_account_key = "--service-account-private-key-file=/srv/kubernetes/server.key" -%}
|
||||
@@ -46,7 +46,7 @@
|
||||
|
||||
{% set root_ca_file = "" -%}
|
||||
|
||||
{% if grains['cloud'] is defined and grains.cloud in [ 'aws', 'gce', 'vagrant', 'vsphere' ] %}
|
||||
{% if grains['cloud'] is defined and grains.cloud in [ 'aws', 'gce', 'vagrant', 'vsphere', 'photon-controller' ] %}
|
||||
{% set root_ca_file = "--root-ca-file=/srv/kubernetes/ca.crt" -%}
|
||||
{% endif -%}
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
{% set ips = salt['mine.get']('roles:kubernetes-master', 'network.ip_addrs', 'grain').values() -%}
|
||||
{% set api_servers = "--master=https://" + ips[0][0] -%}
|
||||
{% endif -%}
|
||||
{% if grains['cloud'] is defined and grains.cloud in [ 'aws', 'gce', 'vagrant', 'vsphere' ] %}
|
||||
{% if grains['cloud'] is defined and grains.cloud in [ 'aws', 'gce', 'vagrant', 'vsphere', 'photon-controller' ] %}
|
||||
{% set api_servers_with_port = api_servers -%}
|
||||
{% else -%}
|
||||
{% set api_servers_with_port = api_servers + ":6443" -%}
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
{% endif -%}
|
||||
|
||||
# TODO: remove nginx for other cloud providers.
|
||||
{% if grains['cloud'] is defined and grains.cloud in [ 'aws', 'gce', 'vagrant', 'vsphere' ] %}
|
||||
{% if grains['cloud'] is defined and grains.cloud in [ 'aws', 'gce', 'vagrant', 'vsphere', 'photon-controller' ] %}
|
||||
{% set api_servers_with_port = api_servers -%}
|
||||
{% else -%}
|
||||
{% set api_servers_with_port = api_servers + ":6443" -%}
|
||||
@@ -28,7 +28,7 @@
|
||||
|
||||
{% set reconcile_cidr_args = "" -%}
|
||||
{% if grains['roles'][0] == 'kubernetes-master' -%}
|
||||
{% if grains.cloud in ['aws', 'gce', 'vagrant', 'vsphere'] -%}
|
||||
{% if grains.cloud in ['aws', 'gce', 'vagrant', 'vsphere', 'photon-controller'] -%}
|
||||
|
||||
# Unless given a specific directive, disable registration for the kubelet
|
||||
# running on the master.
|
||||
@@ -48,7 +48,7 @@
|
||||
{% endif -%}
|
||||
|
||||
{% set cloud_provider = "" -%}
|
||||
{% if grains.cloud is defined and grains.cloud not in ['vagrant', 'vsphere'] -%}
|
||||
{% if grains.cloud is defined and grains.cloud not in ['vagrant', 'vsphere', 'photon-controller'] -%}
|
||||
{% set cloud_provider = "--cloud-provider=" + grains.cloud -%}
|
||||
{% endif -%}
|
||||
|
||||
|
||||
@@ -72,7 +72,7 @@ base:
|
||||
- logrotate
|
||||
{% endif %}
|
||||
- kube-addons
|
||||
{% if grains['cloud'] is defined and grains['cloud'] in [ 'vagrant', 'gce', 'aws', 'vsphere' ] %}
|
||||
{% if grains['cloud'] is defined and grains['cloud'] in [ 'vagrant', 'gce', 'aws', 'vsphere', 'photon-controller' ] %}
|
||||
- docker
|
||||
- kubelet
|
||||
{% endif %}
|
||||
|
||||
Reference in New Issue
Block a user