Documentation ¶
Overview ¶
Package openstack generates Machine objects for openstack.
Package openstack generates Machine objects for openstack.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var MasterMachinesTmpl = template.Must(template.New("openstack-master-machines").Parse(`
{{- $c := . -}}
kind: List
apiVersion: v1
metadata:
resourceVersion: ""
selfLink: ""
items:
{{- range $index,$instance := .Instances}}
- apiVersion: cluster.k8s.io/v1alpha1
kind: Machine
metadata:
name: {{$c.ClusterName}}-master-{{$index}}
namespace: openshift-cluster-api
labels:
sigs.k8s.io/cluster-api-cluster: {{$c.ClusterName}}
sigs.k8s.io/cluster-api-machine-role: master
sigs.k8s.io/cluster-api-machine-type: master
spec:
providerSpec:
value:
apiVersion: openstack.cluster.k8s.io/v1alpha1
kind: OpenStackMachineProviderConfig
cloudName: {{$c.CloudName}}
cloudsSecret: "openstack-credentials"
image: {{$c.Image}}
flavor: {{$c.Machine.FlavorName}}
placement:
region: {{$c.Region}}
networks:
{{- range $key,$value := $c.Tags}}
- filter:
tags: "{{$key}}={{$value}}"
{{- end}}
securityGroups:
- master
userDataSecret:
name: master-user-data
trunk: {{$c.Trunk}}
versions:
kubelet: "v1.11.0"
controlPlane: ""
{{- end -}}
`))
MasterMachinesTmpl is the template for master machines.
View Source
var WorkerMachineSetTmpl = template.Must(template.New("openstack-worker-machineset").Parse(`
apiVersion: cluster.k8s.io/v1alpha1
kind: MachineSet
metadata:
name: {{.ClusterName}}-worker
namespace: openshift-cluster-api
labels:
sigs.k8s.io/cluster-api-cluster: {{.ClusterName}}
sigs.k8s.io/cluster-api-machine-role: worker
sigs.k8s.io/cluster-api-machine-type: worker
spec:
replicas: {{.Replicas}}
selector:
matchLabels:
sigs.k8s.io/cluster-api-machineset: {{.ClusterName}}-worker
sigs.k8s.io/cluster-api-cluster: {{.ClusterName}}
template:
metadata:
labels:
sigs.k8s.io/cluster-api-machineset: {{.ClusterName}}-worker
sigs.k8s.io/cluster-api-cluster: {{.ClusterName}}
sigs.k8s.io/cluster-api-machine-role: worker
sigs.k8s.io/cluster-api-machine-type: worker
spec:
providerSpec:
value:
apiVersion: openstack.cluster.k8s.io/v1alpha1
kind: OpenStackMachineProviderConfig
cloudName: {{.CloudName}}
cloudsSecret: "openstack-credentials"
image: {{.Image}}
flavor: {{.Machine.FlavorName}}
placement:
region: {{.Region}}
networks:
{{- range $key,$value := .Tags}}
- filter:
tags: "{{$key}}={{$value}}"
{{- end}}
securityGroups:
- worker
userDataSecret:
name: worker-user-data
trunk: {{.Trunk}}
versions:
kubelet: "v1.11.0"
controlPlane: ""
`))
WorkerMachineSetTmpl is template for worker machineset.
Functions ¶
This section is empty.
Types ¶
Click to show internal directories.
Click to hide internal directories.