github.com/SUSE/skuba@v1.4.17/pkg/skuba/actions/cluster/init/assets.go (about) 1 /* 2 * Copyright (c) 2019 SUSE LLC. All rights reserved. 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 * 16 */ 17 18 package cluster 19 20 import ( 21 "strings" 22 ) 23 24 var ( 25 cloudReadme = strings.ReplaceAll(`# Cloud provider integration 26 27 This directory contains all supported cloud provider integration configurations 28 and instructions. 29 30 - [~Openstack~](openstack/README.md) 31 - [~AWS~](aws/README.md) 32 - [~vSphere~](vsphere/README.md) 33 34 ## Important 35 36 If you don't make any change on this directories the cluster will be deployed 37 with no specific cloud provider integration. 38 39 Only one cloud provider integration is supported for a given cluster. 40 41 ## Cleanup 42 43 By enabling CPI providers your kubernetes cluster will be able to provision cloud 44 resources on its own (eg: Load Balancers, Persistent Volumes). You will have to manually 45 clean these resources before you destroy the cluster with terraform. 46 `, "~", "`") 47 48 openstackReadme = strings.ReplaceAll(`# ~Openstack~ integration 49 50 Create a file inside this directory named ~openstack.conf~, with the [supported contents](https://github.com/kubernetes/cloud-provider-openstack/blob/master/docs/provider-configuration.md): 51 52 You can find a template named openstack.conf.template inside this directory. 53 54 Warning!!! Please replace option values with variables from OpenStack RC file. 55 56 ~~~ 57 [Global] 58 auth-url=<OS_AUTH_URL> 59 username=<OS_USERNAME> 60 password=<OS_PASSWORD> 61 tenant-id=<OS_PROJECT_ID> 62 domain-name=<OS_USER_DOMAIN_NAME> 63 region=<OS_REGION_NAME> 64 [LoadBalancer] 65 lb-version=v2 66 subnet-id=<PRIVATE_SUBNET_ID> 67 floating-network-id=<PUBLIC_NET_ID> 68 create-monitor=yes 69 monitor-delay=1m 70 monitor-timeout=30s 71 monitor-max-retries=3 72 [BlockStorage] 73 trust-device-path=false 74 bs-version=v2 75 ignore-volume-az=true 76 ~~~ 77 78 If this file exists the cloud integration for ~Openstack~ will be automatically 79 enabled when you bootstrap the cluster. 80 81 ## Important 82 83 When the cloud provider integration is enabled, it's very important to bootstrap 84 and join nodes with the same node names that they have inside ~Openstack~, as 85 this name will be used by the ~Openstack~ cloud controller manager to reconcile 86 node metadata. 87 `, "~", "`") 88 89 openstackCloudConfTemplate = `[Global] 90 auth-url=<OS_AUTH_URL> 91 username=<OS_USERNAME> 92 password=<OS_PASSWORD> 93 tenant-id=<OS_PROJECT_ID> 94 domain-name=<OS_USER_DOMAIN_NAME> 95 region=<OS_REGION_NAME> 96 [LoadBalancer] 97 lb-version=v2 98 subnet-id=<PRIVATE_SUBNET_ID> 99 floating-network-id=<PUBLIC_NET_ID> 100 create-monitor=yes 101 monitor-delay=1m 102 monitor-timeout=30s 103 monitor-max-retries=3 104 [BlockStorage] 105 trust-device-path=false 106 bs-version=v2 107 ignore-volume-az=true 108 ` 109 110 awsReadme = strings.ReplaceAll(`# ~AWS~ integration 111 112 No special operation needs to be performed if you deployed the whole 113 infrastructure using the terraform state files provided by SUSE. 114 `, "~", "`") 115 116 vSphereReadme = strings.ReplaceAll(`# ~vSphere~ integration 117 118 Create a file inside this directory named ~vsphere.conf~, with the [supported contents](https://github.com/kubernetes/cloud-provider-vsphere/blob/master/docs/book/cloud_config.md): 119 120 You can find a template named vsphere.conf.template inside this directory. 121 122 ~~~ 123 [Global] 124 user = "<VC_USERNAME>" 125 password = "<VC_PASSWORD>" 126 port = "443" 127 insecure-flag = "1" 128 [VirtualCenter "<VC_IP_OR_FQDN>"] 129 datacenters = "<VC_DATACENTERS>" 130 [Workspace] 131 server = "<VC_IP_OR_FQDN>" 132 datacenter = "<VC_DATACENTER>" 133 default-datastore = "<VC_DATASTORE>" 134 resourcepool-path = "<VC_RESOURCEPOOL_PATH>" 135 folder = "<VC_VM_FOLDER>" 136 [Disk] 137 scsicontrollertype = pvscsi 138 [Network] 139 public-network = "VM Network" 140 ~~~ 141 142 If this file exists the cloud integration for ~vSphere~ will be automatically 143 enabled when you bootstrap the cluster. 144 145 ## Important 146 147 When the cloud provider integration is enabled, it's very important to bootstrap 148 and join nodes with the node names same as ~vSphere~ virtual machine's hostnames, 149 as these names will be used by services to reconcile node metadata. 150 `, "~", "`") 151 152 vSphereCloudConfTemplate = `[Global] 153 user = "<VC_USERNAME>" 154 password = "<VC_PASSWORD>" 155 port = "443" 156 insecure-flag = "1" 157 [VirtualCenter "<VC_IP_OR_FQDN>"] 158 datacenters = "<VC_DATACENTERS>" 159 [Workspace] 160 server = "<VC_IP_OR_FQDN>" 161 datacenter = "<VC_DATACENTER>" 162 default-datastore = "<VC_DATASTORE>" 163 resourcepool-path = "<VC_RESOURCEPOOL_PATH>" 164 folder = "<VC_VM_FOLDER>" 165 [Disk] 166 scsicontrollertype = pvscsi 167 [Network] 168 public-network = "VM Network" 169 ` 170 )