diff --git a/spectro/base/kustomization.yaml b/spectro/base/kustomization.yaml new file mode 100644 index 0000000000..1bf02fcacb --- /dev/null +++ b/spectro/base/kustomization.yaml @@ -0,0 +1,7 @@ +namePrefix: capv- + +commonLabels: + cluster.x-k8s.io/provider: "infrastructure-vsphere" + +bases: + - ../../config/default diff --git a/spectro/generated/core-base.yaml b/spectro/generated/core-base.yaml new file mode 100644 index 0000000000..af3f6dbaf9 --- /dev/null +++ b/spectro/generated/core-base.yaml @@ -0,0 +1,325 @@ +apiVersion: v1 +kind: Namespace +metadata: + labels: + cluster.x-k8s.io/provider: infrastructure-vsphere + name: capv-system +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: Role +metadata: + labels: + cluster.x-k8s.io/provider: infrastructure-vsphere + name: capv-leader-election-role + namespace: capv-system +rules: +- apiGroups: + - "" + resources: + - configmaps + verbs: + - get + - list + - watch + - create + - update + - patch + - delete +- apiGroups: + - "" + resources: + - configmaps/status + verbs: + - get + - update + - patch +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + creationTimestamp: null + labels: + cluster.x-k8s.io/provider: infrastructure-vsphere + name: capv-manager-role +rules: +- apiGroups: + - "" + resources: + - events + verbs: + - create + - get + - list + - patch + - update + - watch +- apiGroups: + - cluster.x-k8s.io + resources: + - clusters + - clusters/status + verbs: + - get + - list + - watch +- apiGroups: + - cluster.x-k8s.io + resources: + - machines + - machines/status + verbs: + - get + - list + - watch +- apiGroups: + - "" + resources: + - secrets + verbs: + - create + - delete + - get + - list + - patch + - watch +- apiGroups: + - infrastructure.cluster.x-k8s.io + resources: + - haproxyloadbalancers + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - infrastructure.cluster.x-k8s.io + resources: + - haproxyloadbalancers/status + verbs: + - get + - patch + - update +- apiGroups: + - infrastructure.cluster.x-k8s.io + resources: + - vsphereclusters + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - infrastructure.cluster.x-k8s.io + resources: + - vsphereclusters/status + verbs: + - get + - patch + - update +- apiGroups: + - infrastructure.cluster.x-k8s.io + resources: + - vspheremachines + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - infrastructure.cluster.x-k8s.io + resources: + - vspheremachines/status + verbs: + - get + - patch + - update +- apiGroups: + - infrastructure.cluster.x-k8s.io + resources: + - vspherevms + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - infrastructure.cluster.x-k8s.io + resources: + - vspherevms/status + verbs: + - get + - patch + - update +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + labels: + cluster.x-k8s.io/provider: infrastructure-vsphere + name: capv-proxy-role +rules: +- apiGroups: + - authentication.k8s.io + resources: + - tokenreviews + verbs: + - create +- apiGroups: + - authorization.k8s.io + resources: + - subjectaccessreviews + verbs: + - create +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: RoleBinding +metadata: + labels: + cluster.x-k8s.io/provider: infrastructure-vsphere + name: capv-leader-election-rolebinding + namespace: capv-system +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: Role + name: capv-leader-election-role +subjects: +- kind: ServiceAccount + name: default + namespace: capv-system +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + labels: + cluster.x-k8s.io/provider: infrastructure-vsphere + name: capv-manager-rolebinding +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: capv-manager-role +subjects: +- kind: ServiceAccount + name: default + namespace: capv-system +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + labels: + cluster.x-k8s.io/provider: infrastructure-vsphere + name: capv-proxy-rolebinding +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: capv-proxy-role +subjects: +- kind: ServiceAccount + name: default + namespace: capv-system +--- +apiVersion: v1 +kind: Secret +metadata: + labels: + cluster.x-k8s.io/provider: infrastructure-vsphere + name: capv-manager-bootstrap-credentials + namespace: capv-system +stringData: + credentials.yaml: |- + username: ${VSPHERE_USERNAME} + password: ${VSPHERE_PASSWORD} +type: Opaque +--- +apiVersion: v1 +kind: Service +metadata: + annotations: + prometheus.io/port: "8443" + prometheus.io/scheme: https + prometheus.io/scrape: "true" + labels: + cluster.x-k8s.io/provider: infrastructure-vsphere + control-plane: controller-manager + name: capv-controller-manager-metrics-service + namespace: capv-system +spec: + ports: + - name: https + port: 8443 + targetPort: https + selector: + cluster.x-k8s.io/provider: infrastructure-vsphere + control-plane: controller-manager +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + cluster.x-k8s.io/provider: infrastructure-vsphere + control-plane: controller-manager + name: capv-controller-manager + namespace: capv-system +spec: + replicas: 1 + selector: + matchLabels: + cluster.x-k8s.io/provider: infrastructure-vsphere + control-plane: controller-manager + template: + metadata: + labels: + cluster.x-k8s.io/provider: infrastructure-vsphere + control-plane: controller-manager + spec: + containers: + - args: + - --secure-listen-address=0.0.0.0:8443 + - --upstream=http://127.0.0.1:8080/ + - --logtostderr=true + - --v=10 + image: gcr.io/kubebuilder/kube-rbac-proxy:v0.4.0 + name: kube-rbac-proxy + ports: + - containerPort: 8443 + name: https + - args: + - --metrics-addr=127.0.0.1:8080 + image: gcr.io/cluster-api-provider-vsphere/release/manager:latest + imagePullPolicy: IfNotPresent + livenessProbe: + httpGet: + path: /healthz + port: healthz + name: manager + ports: + - containerPort: 9440 + name: healthz + protocol: TCP + readinessProbe: + httpGet: + path: /readyz + port: healthz + volumeMounts: + - mountPath: /etc/capv + name: manager-bootstrap-credentials + readOnly: true + terminationGracePeriodSeconds: 10 + tolerations: + - effect: NoSchedule + key: node-role.kubernetes.io/master + volumes: + - name: manager-bootstrap-credentials + secret: + secretName: capv-manager-bootstrap-credentials diff --git a/spectro/generated/core-global.yaml b/spectro/generated/core-global.yaml new file mode 100644 index 0000000000..9d3e00fdc8 --- /dev/null +++ b/spectro/generated/core-global.yaml @@ -0,0 +1,2586 @@ +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + cert-manager.io/inject-ca-from: capi-webhook-system/capv-serving-cert + controller-gen.kubebuilder.io/version: v0.2.6 + creationTimestamp: null + labels: + cluster.x-k8s.io/provider: infrastructure-vsphere + cluster.x-k8s.io/v1alpha3: v1alpha3 + name: haproxyloadbalancers.infrastructure.cluster.x-k8s.io +spec: + conversion: + strategy: Webhook + webhook: + clientConfig: + caBundle: Cg== + service: + name: capv-webhook-service + namespace: capi-webhook-system + path: /convert + conversionReviewVersions: + - v1 + - v1beta1 + group: infrastructure.cluster.x-k8s.io + names: + kind: HAProxyLoadBalancer + listKind: HAProxyLoadBalancerList + plural: haproxyloadbalancers + singular: haproxyloadbalancer + scope: Namespaced + versions: + - name: v1alpha3 + schema: + openAPIV3Schema: + description: HAProxyLoadBalancer is the Schema for the haproxyloadbalancers + API + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + description: HAProxyLoadBalancerSpec defines the desired state of HAProxyLoadBalancer. + properties: + user: + description: SSHUser specifies the name of a user that is granted + remote access to the deployed VM. + properties: + authorizedKeys: + description: AuthorizedKeys is one or more public SSH keys that + grant remote access. + items: + type: string + type: array + name: + description: Name is the name of the SSH user. + type: string + required: + - authorizedKeys + - name + type: object + virtualMachineConfiguration: + description: VirtualMachineConfiguration is information used to deploy + a load balancer VM. + properties: + cloneMode: + description: CloneMode specifies the type of clone operation. + The LinkedClone mode is only support for templates that have + at least one snapshot. If the template has no snapshots, then + CloneMode defaults to FullClone. When LinkedClone mode is enabled + the DiskGiB field is ignored as it is not possible to expand + disks of linked clones. Defaults to LinkedClone, but fails gracefully + to FullClone if the source of the clone operation has no snapshots. + type: string + datacenter: + description: Datacenter is the name or inventory path of the datacenter + in which the virtual machine is created/located. + type: string + datastore: + description: Datastore is the name or inventory path of the datastore + in which the virtual machine is created/located. + type: string + diskGiB: + description: DiskGiB is the size of a virtual machine's disk, + in GiB. Defaults to the eponymous property value in the template + from which the virtual machine is cloned. + format: int32 + type: integer + folder: + description: Folder is the name or inventory path of the folder + in which the virtual machine is created/located. + type: string + memoryMiB: + description: MemoryMiB is the size of a virtual machine's memory, + in MiB. Defaults to the eponymous property value in the template + from which the virtual machine is cloned. + format: int64 + type: integer + network: + description: Network is the network configuration for this machine's + VM. + properties: + devices: + description: Devices is the list of network devices used by + the virtual machine. TODO(akutz) Make sure at least one + network matches the ClusterSpec.CloudProviderConfiguration.Network.Name + items: + description: NetworkDeviceSpec defines the network configuration + for a virtual machine's network device. + properties: + deviceName: + description: DeviceName may be used to explicitly assign + a name to the network device as it exists in the guest + operating system. + type: string + dhcp4: + description: DHCP4 is a flag that indicates whether + or not to use DHCP for IPv4 on this device. If true + then IPAddrs should not contain any IPv4 addresses. + type: boolean + dhcp6: + description: DHCP6 is a flag that indicates whether + or not to use DHCP for IPv6 on this device. If true + then IPAddrs should not contain any IPv6 addresses. + type: boolean + gateway4: + description: Gateway4 is the IPv4 gateway used by this + device. Required when DHCP4 is false. + type: string + gateway6: + description: Gateway4 is the IPv4 gateway used by this + device. Required when DHCP6 is false. + type: string + ipAddrs: + description: IPAddrs is a list of one or more IPv4 and/or + IPv6 addresses to assign to this device. Required + when DHCP4 and DHCP6 are both false. + items: + type: string + type: array + macAddr: + description: MACAddr is the MAC address used by this + device. It is generally a good idea to omit this field + and allow a MAC address to be generated. Please note + that this value must use the VMware OUI to work with + the in-tree vSphere cloud provider. + type: string + mtu: + description: MTU is the device’s Maximum Transmission + Unit size in bytes. + format: int64 + type: integer + nameservers: + description: Nameservers is a list of IPv4 and/or IPv6 + addresses used as DNS nameservers. Please note that + Linux allows only three nameservers (https://linux.die.net/man/5/resolv.conf). + items: + type: string + type: array + networkName: + description: NetworkName is the name of the vSphere + network to which the device will be connected. + type: string + routes: + description: Routes is a list of optional, static routes + applied to the device. + items: + description: NetworkRouteSpec defines a static network + route. + properties: + metric: + description: Metric is the weight/priority of + the route. + format: int32 + type: integer + to: + description: To is an IPv4 or IPv6 address. + type: string + via: + description: Via is an IPv4 or IPv6 address. + type: string + required: + - metric + - to + - via + type: object + type: array + searchDomains: + description: SearchDomains is a list of search domains + used when resolving IP addresses with DNS. + items: + type: string + type: array + required: + - networkName + type: object + type: array + preferredAPIServerCidr: + description: PreferredAPIServeCIDR is the preferred CIDR for + the Kubernetes API server endpoint on this machine + type: string + routes: + description: Routes is a list of optional, static routes applied + to the virtual machine. + items: + description: NetworkRouteSpec defines a static network route. + properties: + metric: + description: Metric is the weight/priority of the route. + format: int32 + type: integer + to: + description: To is an IPv4 or IPv6 address. + type: string + via: + description: Via is an IPv4 or IPv6 address. + type: string + required: + - metric + - to + - via + type: object + type: array + required: + - devices + type: object + numCPUs: + description: NumCPUs is the number of virtual processors in a + virtual machine. Defaults to the eponymous property value in + the template from which the virtual machine is cloned. + format: int32 + type: integer + numCoresPerSocket: + description: NumCPUs is the number of cores among which to distribute + CPUs in this virtual machine. Defaults to the eponymous property + value in the template from which the virtual machine is cloned. + format: int32 + type: integer + resourcePool: + description: ResourcePool is the name or inventory path of the + resource pool in which the virtual machine is created/located. + type: string + server: + description: Server is the IP address or FQDN of the vSphere server + on which the virtual machine is created/located. + type: string + snapshot: + description: Snapshot is the name of the snapshot from which to + create a linked clone. This field is ignored if LinkedClone + is not enabled. Defaults to the source's current snapshot. + type: string + template: + description: Template is the name or inventory path of the template + used to clone the virtual machine. + type: string + required: + - network + - template + type: object + required: + - virtualMachineConfiguration + type: object + status: + description: HAProxyLoadBalancerStatus defines the observed state of HAProxyLoadBalancer. + properties: + address: + description: "Address is the IP address or DNS name of the load balancer. + \n This field is required as part of the Portable Load Balancer + model and is inspected via an unstructured reader by other controllers + to determine the status of the load balancer." + type: string + ready: + description: "Ready indicates whether or not the load balancer is + ready. \n This field is required as part of the Portable Load Balancer + model and is inspected via an unstructured reader by other controllers + to determine the status of the load balancer." + type: boolean + type: object + type: object + served: true + storage: true + subresources: + status: {} +status: + acceptedNames: + kind: "" + plural: "" + conditions: [] + storedVersions: [] +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + cert-manager.io/inject-ca-from: capi-webhook-system/capv-serving-cert + controller-gen.kubebuilder.io/version: v0.2.6 + creationTimestamp: null + labels: + cluster.x-k8s.io/provider: infrastructure-vsphere + cluster.x-k8s.io/v1alpha3: v1alpha3 + name: vsphereclusters.infrastructure.cluster.x-k8s.io +spec: + conversion: + strategy: Webhook + webhook: + clientConfig: + caBundle: Cg== + service: + name: capv-webhook-service + namespace: capi-webhook-system + path: /convert + conversionReviewVersions: + - v1 + - v1beta1 + group: infrastructure.cluster.x-k8s.io + names: + categories: + - cluster-api + kind: VSphereCluster + listKind: VSphereClusterList + plural: vsphereclusters + singular: vspherecluster + scope: Namespaced + versions: + - name: v1alpha2 + schema: + openAPIV3Schema: + description: VSphereCluster is the Schema for the vsphereclusters API + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + description: VSphereClusterSpec defines the desired state of VSphereCluster + properties: + cloudProviderConfiguration: + description: CloudProviderConfiguration holds the cluster-wide configuration + for the vSphere cloud provider. + properties: + disk: + description: Disk is the vSphere cloud provider's disk configuration. + properties: + scsiControllerType: + description: SCSIControllerType defines SCSI controller to + be used. + type: string + type: object + global: + description: Global is the vSphere cloud provider's global configuration. + properties: + apiBindPort: + description: APIBindPort configures the vSphere cloud controller + manager API port. Defaults to 43001. + type: string + apiDisable: + description: APIDisable disables the vSphere cloud controller + manager API. Defaults to true. + type: boolean + caFile: + description: CAFile Specifies the path to a CA certificate + in PEM format. If not configured, the system's CA certificates + will be used. + type: string + datacenters: + description: Datacenters is a CSV string of the datacenters + in which VMs are located. + type: string + insecure: + description: Insecure is a flag that disables TLS peer verification. + type: boolean + password: + description: Password is the password used to access a vSphere + endpoint. + type: string + port: + description: Port is the port on which the vSphere endpoint + is listening. Defaults to 443. + type: string + roundTripperCount: + description: RoundTripperCount specifies the SOAP round tripper + count (retries = RoundTripper - 1) + format: int32 + type: integer + secretName: + description: SecretName is the name of the Kubernetes secret + in which the vSphere credentials are located. + type: string + secretNamespace: + description: SecretNamespace is the namespace for SecretName. + type: string + secretsDirectory: + description: 'SecretsDirectory is a directory in which secrets + may be found. This may used in the event that: 1. It is + not desirable to use the K8s API to watch changes to secrets + 2. The cloud controller manager is not running in a K8s + environment, such as DC/OS. For example, the container + storage interface (CSI) is container orcehstrator (CO) + agnostic, and should support non-K8s COs. Defaults to /etc/cloud/credentials.' + type: string + serviceAccount: + description: ServiceAccount is the Kubernetes service account + used to launch the cloud controller manager. Defaults to + cloud-controller-manager. + type: string + thumbprint: + description: Thumbprint is the cryptographic thumbprint of + the vSphere endpoint's certificate. + type: string + username: + description: Username is the username used to access a vSphere + endpoint. + type: string + type: object + labels: + description: Labels is the vSphere cloud provider's zone and region + configuration. + properties: + region: + description: Region is the region in which VMs are created/located. + type: string + zone: + description: Zone is the zone in which VMs are created/located. + type: string + type: object + network: + description: Network is the vSphere cloud provider's network configuration. + properties: + name: + description: Name is the name of the network to which VMs + are connected. + type: string + type: object + providerConfig: + description: CPIProviderConfig contains extra information used + to configure the vSphere cloud provider. + properties: + cloud: + properties: + controllerImage: + type: string + type: object + storage: + properties: + attacherImage: + type: string + controllerImage: + type: string + livenessProbeImage: + type: string + metadataSyncerImage: + type: string + nodeDriverImage: + type: string + provisionerImage: + type: string + registrarImage: + type: string + type: object + type: object + virtualCenter: + additionalProperties: + description: CPIVCenterConfig is a vSphere cloud provider's + vCenter configuration. + properties: + datacenters: + description: Datacenters is a CSV string of the datacenters + in which VMs are located. + type: string + password: + description: Password is the password used to access a vSphere + endpoint. + type: string + port: + description: Port is the port on which the vSphere endpoint + is listening. Defaults to 443. + type: string + roundTripperCount: + description: RoundTripperCount specifies the SOAP round + tripper count (retries = RoundTripper - 1) + format: int32 + type: integer + thumbprint: + description: Thumbprint is the cryptographic thumbprint + of the vSphere endpoint's certificate. + type: string + username: + description: Username is the username used to access a vSphere + endpoint. + type: string + type: object + description: VCenter is a list of vCenter configurations. + type: object + workspace: + description: Workspace is the vSphere cloud provider's workspace + configuration. + properties: + datacenter: + description: Datacenter is the datacenter in which VMs are + created/located. + type: string + datastore: + description: Datastore is the datastore in which VMs are created/located. + type: string + folder: + description: Folder is the folder in which VMs are created/located. + type: string + resourcePool: + description: ResourcePool is the resource pool in which VMs + are created/located. + type: string + server: + description: Server is the IP address or FQDN of the vSphere + endpoint. + type: string + type: object + type: object + insecure: + description: Insecure is a flag that controls whether or not to validate + the vSphere server's certificate. + type: boolean + server: + description: Server is the address of the vSphere endpoint. + type: string + type: object + status: + description: VSphereClusterStatus defines the observed state of VSphereClusterSpec + properties: + apiEndpoints: + description: APIEndpoints represents the endpoints to communicate + with the control plane. + items: + description: APIEndpoint represents a reachable Kubernetes API endpoint. + properties: + host: + description: The hostname on which the API server is serving. + type: string + port: + description: The port on which the API server is serving. + type: integer + required: + - host + - port + type: object + type: array + ready: + type: boolean + required: + - ready + type: object + type: object + served: true + storage: false + subresources: + status: {} + - name: v1alpha3 + schema: + openAPIV3Schema: + description: VSphereCluster is the Schema for the vsphereclusters API + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + description: VSphereClusterSpec defines the desired state of VSphereCluster + properties: + cloudProviderConfiguration: + description: CloudProviderConfiguration holds the cluster-wide configuration + for the vSphere cloud provider. + properties: + disk: + description: Disk is the vSphere cloud provider's disk configuration. + properties: + scsiControllerType: + description: SCSIControllerType defines SCSI controller to + be used. + type: string + type: object + global: + description: Global is the vSphere cloud provider's global configuration. + properties: + apiBindPort: + description: APIBindPort configures the vSphere cloud controller + manager API port. Defaults to 43001. + type: string + apiDisable: + description: APIDisable disables the vSphere cloud controller + manager API. Defaults to true. + type: boolean + caFile: + description: CAFile Specifies the path to a CA certificate + in PEM format. If not configured, the system's CA certificates + will be used. + type: string + datacenters: + description: Datacenters is a CSV string of the datacenters + in which VMs are located. + type: string + insecure: + description: Insecure is a flag that disables TLS peer verification. + type: boolean + password: + description: Password is the password used to access a vSphere + endpoint. + type: string + port: + description: Port is the port on which the vSphere endpoint + is listening. Defaults to 443. + type: string + roundTripperCount: + description: RoundTripperCount specifies the SOAP round tripper + count (retries = RoundTripper - 1) + format: int32 + type: integer + secretName: + description: SecretName is the name of the Kubernetes secret + in which the vSphere credentials are located. + type: string + secretNamespace: + description: SecretNamespace is the namespace for SecretName. + type: string + secretsDirectory: + description: 'SecretsDirectory is a directory in which secrets + may be found. This may used in the event that: 1. It is + not desirable to use the K8s API to watch changes to secrets + 2. The cloud controller manager is not running in a K8s + environment, such as DC/OS. For example, the container + storage interface (CSI) is container orcehstrator (CO) + agnostic, and should support non-K8s COs. Defaults to /etc/cloud/credentials.' + type: string + serviceAccount: + description: ServiceAccount is the Kubernetes service account + used to launch the cloud controller manager. Defaults to + cloud-controller-manager. + type: string + thumbprint: + description: Thumbprint is the cryptographic thumbprint of + the vSphere endpoint's certificate. + type: string + username: + description: Username is the username used to access a vSphere + endpoint. + type: string + type: object + labels: + description: Labels is the vSphere cloud provider's zone and region + configuration. + properties: + region: + description: Region is the region in which VMs are created/located. + type: string + zone: + description: Zone is the zone in which VMs are created/located. + type: string + type: object + network: + description: Network is the vSphere cloud provider's network configuration. + properties: + name: + description: Name is the name of the network to which VMs + are connected. + type: string + type: object + providerConfig: + description: CPIProviderConfig contains extra information used + to configure the vSphere cloud provider. + properties: + cloud: + properties: + controllerImage: + type: string + extraArgs: + additionalProperties: + type: string + description: ExtraArgs passes through extra arguments + to the cloud provider. The arguments here are passed + to the cloud provider daemonset specification + type: object + type: object + storage: + properties: + attacherImage: + type: string + controllerImage: + type: string + livenessProbeImage: + type: string + metadataSyncerImage: + type: string + nodeDriverImage: + type: string + provisionerImage: + type: string + registrarImage: + type: string + type: object + type: object + virtualCenter: + additionalProperties: + description: CPIVCenterConfig is a vSphere cloud provider's + vCenter configuration. + properties: + datacenters: + description: Datacenters is a CSV string of the datacenters + in which VMs are located. + type: string + password: + description: Password is the password used to access a vSphere + endpoint. + type: string + port: + description: Port is the port on which the vSphere endpoint + is listening. Defaults to 443. + type: string + roundTripperCount: + description: RoundTripperCount specifies the SOAP round + tripper count (retries = RoundTripper - 1) + format: int32 + type: integer + thumbprint: + description: Thumbprint is the cryptographic thumbprint + of the vSphere endpoint's certificate. + type: string + username: + description: Username is the username used to access a vSphere + endpoint. + type: string + type: object + description: VCenter is a list of vCenter configurations. + type: object + workspace: + description: Workspace is the vSphere cloud provider's workspace + configuration. + properties: + datacenter: + description: Datacenter is the datacenter in which VMs are + created/located. + type: string + datastore: + description: Datastore is the datastore in which VMs are created/located. + type: string + folder: + description: Folder is the folder in which VMs are created/located. + type: string + resourcePool: + description: ResourcePool is the resource pool in which VMs + are created/located. + type: string + server: + description: Server is the IP address or FQDN of the vSphere + endpoint. + type: string + type: object + type: object + controlPlaneEndpoint: + description: ControlPlaneEndpoint represents the endpoint used to + communicate with the control plane. + properties: + host: + description: The hostname on which the API server is serving. + type: string + port: + description: The port on which the API server is serving. + format: int32 + type: integer + required: + - host + - port + type: object + insecure: + description: Insecure is a flag that controls whether or not to validate + the vSphere server's certificate. + type: boolean + loadBalancerRef: + description: LoadBalancerRef may be used to enable a control plane + load balancer for this cluster. When a LoadBalancerRef is provided, + the VSphereCluster.Status.Ready field will not be true until the + referenced resource is Status.Ready and has a non-empty Status.Address + value. + properties: + apiVersion: + description: API version of the referent. + type: string + fieldPath: + description: 'If referring to a piece of an object instead of + an entire object, this string should contain a valid JSON/Go + field access statement, such as desiredState.manifest.containers[2]. + For example, if the object reference is to a container within + a pod, this would take on a value like: "spec.containers{name}" + (where "name" refers to the name of the container that triggered + the event) or if no container name is specified "spec.containers[2]" + (container with index 2 in this pod). This syntax is chosen + only to have some well-defined way of referencing a part of + an object. TODO: this design is not final and this field is + subject to change in the future.' + type: string + kind: + description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + type: string + namespace: + description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' + type: string + resourceVersion: + description: 'Specific resourceVersion to which this reference + is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency' + type: string + uid: + description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids' + type: string + type: object + server: + description: Server is the address of the vSphere endpoint. + type: string + type: object + status: + description: VSphereClusterStatus defines the observed state of VSphereClusterSpec + properties: + ready: + type: boolean + required: + - ready + type: object + type: object + served: true + storage: true + subresources: + status: {} +status: + acceptedNames: + kind: "" + plural: "" + conditions: [] + storedVersions: [] +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + cert-manager.io/inject-ca-from: capi-webhook-system/capv-serving-cert + controller-gen.kubebuilder.io/version: v0.2.6 + creationTimestamp: null + labels: + cluster.x-k8s.io/provider: infrastructure-vsphere + cluster.x-k8s.io/v1alpha3: v1alpha3 + name: vspheremachines.infrastructure.cluster.x-k8s.io +spec: + conversion: + strategy: Webhook + webhook: + clientConfig: + caBundle: Cg== + service: + name: capv-webhook-service + namespace: capi-webhook-system + path: /convert + conversionReviewVersions: + - v1 + - v1beta1 + group: infrastructure.cluster.x-k8s.io + names: + categories: + - cluster-api + kind: VSphereMachine + listKind: VSphereMachineList + plural: vspheremachines + singular: vspheremachine + scope: Namespaced + versions: + - name: v1alpha2 + schema: + openAPIV3Schema: + description: VSphereMachine is the Schema for the vspheremachines API + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + description: VSphereMachineSpec defines the desired state of VSphereMachine + properties: + datacenter: + description: Datacenter is the name or inventory path of the datacenter + where this machine's VM is created/located. + type: string + diskGiB: + description: DiskGiB is the size of a virtual machine's disk, in GiB. + Defaults to the analogue property value in the template from which + this machine is cloned. + format: int32 + type: integer + memoryMiB: + description: MemoryMiB is the size of a virtual machine's memory, + in MiB. Defaults to the analogue property value in the template + from which this machine is cloned. + format: int64 + type: integer + network: + description: Network is the network configuration for this machine's + VM. + properties: + devices: + description: Devices is the list of network devices used by the + virtual machine. TODO(akutz) Make sure at least one network + matches the ClusterSpec.CloudProviderConfiguration.Network.Name + items: + description: NetworkDeviceSpec defines the network configuration + for a virtual machine's network device. + properties: + deviceName: + description: DeviceName may be used to explicitly assign + a name to the network device as it exists in the guest + operating system. + type: string + dhcp4: + description: DHCP4 is a flag that indicates whether or not + to use DHCP for IPv4 on this device. If true then IPAddrs + should not contain any IPv4 addresses. + type: boolean + dhcp6: + description: DHCP6 is a flag that indicates whether or not + to use DHCP for IPv6 on this device. If true then IPAddrs + should not contain any IPv6 addresses. + type: boolean + gateway4: + description: Gateway4 is the IPv4 gateway used by this device. + Required when DHCP4 is false. + type: string + gateway6: + description: Gateway4 is the IPv4 gateway used by this device. + Required when DHCP6 is false. + type: string + ipAddrs: + description: IPAddrs is a list of one or more IPv4 and/or + IPv6 addresses to assign to this device. Required when + DHCP4 and DHCP6 are both false. + items: + type: string + type: array + macAddr: + description: MACAddr is the MAC address used by this device. + It is generally a good idea to omit this field and allow + a MAC address to be generated. Please note that this value + must use the VMware OUI to work with the in-tree vSphere + cloud provider. + type: string + mtu: + description: MTU is the device’s Maximum Transmission Unit + size in bytes. + format: int64 + type: integer + nameservers: + description: Nameservers is a list of IPv4 and/or IPv6 addresses + used as DNS nameservers. Please note that Linux allows + only three nameservers (https://linux.die.net/man/5/resolv.conf). + items: + type: string + type: array + networkName: + description: NetworkName is the name of the vSphere network + to which the device will be connected. + type: string + routes: + description: Routes is a list of optional, static routes + applied to the device. + items: + description: NetworkRouteSpec defines a static network + route. + properties: + metric: + description: Metric is the weight/priority of the + route. + format: int32 + type: integer + to: + description: To is an IPv4 or IPv6 address. + type: string + via: + description: Via is an IPv4 or IPv6 address. + type: string + required: + - metric + - to + - via + type: object + type: array + searchDomains: + description: SearchDomains is a list of search domains used + when resolving IP addresses with DNS. + items: + type: string + type: array + required: + - networkName + type: object + type: array + preferredAPIServerCidr: + description: PreferredAPIServeCIDR is the preferred CIDR for the + Kubernetes API server endpoint on this machine + type: string + routes: + description: Routes is a list of optional, static routes applied + to the virtual machine. + items: + description: NetworkRouteSpec defines a static network route. + properties: + metric: + description: Metric is the weight/priority of the route. + format: int32 + type: integer + to: + description: To is an IPv4 or IPv6 address. + type: string + via: + description: Via is an IPv4 or IPv6 address. + type: string + required: + - metric + - to + - via + type: object + type: array + required: + - devices + type: object + numCPUs: + description: NumCPUs is the number of virtual processors in a virtual + machine. Defaults to the analogue property value in the template + from which this machine is cloned. + format: int32 + type: integer + numCoresPerSocket: + description: NumCPUs is the number of cores among which to distribute + CPUs in this virtual machine. Defaults to the analogue property + value in the template from which this machine is cloned. + format: int32 + type: integer + providerID: + description: ProviderID is the virtual machine's BIOS UUID formated + as vsphere://12345678-1234-1234-1234-123456789abc + type: string + template: + description: Template is the name, inventory path, or instance UUID + of the template used to clone new machines. + type: string + required: + - datacenter + - network + - template + type: object + status: + description: VSphereMachineStatus defines the observed state of VSphereMachine + properties: + addresses: + description: Addresses contains the VSphere instance associated addresses. + items: + description: NodeAddress contains information for the node's address. + properties: + address: + description: The node address. + type: string + type: + description: Node address type, one of Hostname, ExternalIP + or InternalIP. + type: string + required: + - address + - type + type: object + type: array + errorMessage: + description: "ErrorMessage will be set in the event that there is + a terminal problem reconciling the Machine and will contain a more + verbose string suitable for logging and human consumption. \n This + field should not be set for transitive errors that a controller + faces that are expected to be fixed automatically over time (like + service outages), but instead indicate that something is fundamentally + wrong with the Machine's spec or the configuration of the controller, + and that manual intervention is required. Examples of terminal errors + would be invalid combinations of settings in the spec, values that + are unsupported by the controller, or the responsible controller + itself being critically misconfigured. \n Any transient errors that + occur during the reconciliation of Machines can be added as events + to the Machine object and/or logged in the controller's output." + type: string + errorReason: + description: "ErrorReason will be set in the event that there is a + terminal problem reconciling the Machine and will contain a succinct + value suitable for machine interpretation. \n This field should + not be set for transitive errors that a controller faces that are + expected to be fixed automatically over time (like service outages), + but instead indicate that something is fundamentally wrong with + the Machine's spec or the configuration of the controller, and that + manual intervention is required. Examples of terminal errors would + be invalid combinations of settings in the spec, values that are + unsupported by the controller, or the responsible controller itself + being critically misconfigured. \n Any transient errors that occur + during the reconciliation of Machines can be added as events to + the Machine object and/or logged in the controller's output." + type: string + networkStatus: + description: Network returns the network status for each of the machine's + configured network interfaces. + items: + description: NetworkStatus provides information about one of a VM's + networks. + properties: + connected: + description: Connected is a flag that indicates whether this + network is currently connected to the VM. + type: boolean + ipAddrs: + description: IPAddrs is one or more IP addresses reported by + vm-tools. + items: + type: string + type: array + macAddr: + description: MACAddr is the MAC address of the network device. + type: string + networkName: + description: NetworkName is the name of the network. + type: string + required: + - macAddr + type: object + type: array + ready: + description: Ready is true when the provider resource is ready. + type: boolean + taskRef: + description: TaskRef is a managed object reference to a Task related + to the machine. This value is set automatically at runtime and should + not be set or modified by users. + type: string + type: object + type: object + served: true + storage: false + subresources: + status: {} + - name: v1alpha3 + schema: + openAPIV3Schema: + description: VSphereMachine is the Schema for the vspheremachines API + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + description: VSphereMachineSpec defines the desired state of VSphereMachine + properties: + cloneMode: + description: CloneMode specifies the type of clone operation. The + LinkedClone mode is only support for templates that have at least + one snapshot. If the template has no snapshots, then CloneMode defaults + to FullClone. When LinkedClone mode is enabled the DiskGiB field + is ignored as it is not possible to expand disks of linked clones. + Defaults to LinkedClone, but fails gracefully to FullClone if the + source of the clone operation has no snapshots. + type: string + datacenter: + description: Datacenter is the name or inventory path of the datacenter + in which the virtual machine is created/located. + type: string + datastore: + description: Datastore is the name or inventory path of the datastore + in which the virtual machine is created/located. + type: string + diskGiB: + description: DiskGiB is the size of a virtual machine's disk, in GiB. + Defaults to the eponymous property value in the template from which + the virtual machine is cloned. + format: int32 + type: integer + folder: + description: Folder is the name or inventory path of the folder in + which the virtual machine is created/located. + type: string + memoryMiB: + description: MemoryMiB is the size of a virtual machine's memory, + in MiB. Defaults to the eponymous property value in the template + from which the virtual machine is cloned. + format: int64 + type: integer + network: + description: Network is the network configuration for this machine's + VM. + properties: + devices: + description: Devices is the list of network devices used by the + virtual machine. TODO(akutz) Make sure at least one network + matches the ClusterSpec.CloudProviderConfiguration.Network.Name + items: + description: NetworkDeviceSpec defines the network configuration + for a virtual machine's network device. + properties: + deviceName: + description: DeviceName may be used to explicitly assign + a name to the network device as it exists in the guest + operating system. + type: string + dhcp4: + description: DHCP4 is a flag that indicates whether or not + to use DHCP for IPv4 on this device. If true then IPAddrs + should not contain any IPv4 addresses. + type: boolean + dhcp6: + description: DHCP6 is a flag that indicates whether or not + to use DHCP for IPv6 on this device. If true then IPAddrs + should not contain any IPv6 addresses. + type: boolean + gateway4: + description: Gateway4 is the IPv4 gateway used by this device. + Required when DHCP4 is false. + type: string + gateway6: + description: Gateway4 is the IPv4 gateway used by this device. + Required when DHCP6 is false. + type: string + ipAddrs: + description: IPAddrs is a list of one or more IPv4 and/or + IPv6 addresses to assign to this device. Required when + DHCP4 and DHCP6 are both false. + items: + type: string + type: array + macAddr: + description: MACAddr is the MAC address used by this device. + It is generally a good idea to omit this field and allow + a MAC address to be generated. Please note that this value + must use the VMware OUI to work with the in-tree vSphere + cloud provider. + type: string + mtu: + description: MTU is the device’s Maximum Transmission Unit + size in bytes. + format: int64 + type: integer + nameservers: + description: Nameservers is a list of IPv4 and/or IPv6 addresses + used as DNS nameservers. Please note that Linux allows + only three nameservers (https://linux.die.net/man/5/resolv.conf). + items: + type: string + type: array + networkName: + description: NetworkName is the name of the vSphere network + to which the device will be connected. + type: string + routes: + description: Routes is a list of optional, static routes + applied to the device. + items: + description: NetworkRouteSpec defines a static network + route. + properties: + metric: + description: Metric is the weight/priority of the + route. + format: int32 + type: integer + to: + description: To is an IPv4 or IPv6 address. + type: string + via: + description: Via is an IPv4 or IPv6 address. + type: string + required: + - metric + - to + - via + type: object + type: array + searchDomains: + description: SearchDomains is a list of search domains used + when resolving IP addresses with DNS. + items: + type: string + type: array + required: + - networkName + type: object + type: array + preferredAPIServerCidr: + description: PreferredAPIServeCIDR is the preferred CIDR for the + Kubernetes API server endpoint on this machine + type: string + routes: + description: Routes is a list of optional, static routes applied + to the virtual machine. + items: + description: NetworkRouteSpec defines a static network route. + properties: + metric: + description: Metric is the weight/priority of the route. + format: int32 + type: integer + to: + description: To is an IPv4 or IPv6 address. + type: string + via: + description: Via is an IPv4 or IPv6 address. + type: string + required: + - metric + - to + - via + type: object + type: array + required: + - devices + type: object + numCPUs: + description: NumCPUs is the number of virtual processors in a virtual + machine. Defaults to the eponymous property value in the template + from which the virtual machine is cloned. + format: int32 + type: integer + numCoresPerSocket: + description: NumCPUs is the number of cores among which to distribute + CPUs in this virtual machine. Defaults to the eponymous property + value in the template from which the virtual machine is cloned. + format: int32 + type: integer + providerID: + description: ProviderID is the virtual machine's BIOS UUID formated + as vsphere://12345678-1234-1234-1234-123456789abc + type: string + resourcePool: + description: ResourcePool is the name or inventory path of the resource + pool in which the virtual machine is created/located. + type: string + server: + description: Server is the IP address or FQDN of the vSphere server + on which the virtual machine is created/located. + type: string + snapshot: + description: Snapshot is the name of the snapshot from which to create + a linked clone. This field is ignored if LinkedClone is not enabled. + Defaults to the source's current snapshot. + type: string + template: + description: Template is the name or inventory path of the template + used to clone the virtual machine. + type: string + required: + - network + - template + type: object + status: + description: VSphereMachineStatus defines the observed state of VSphereMachine + properties: + addresses: + description: Addresses contains the VSphere instance associated addresses. + items: + description: MachineAddress contains information for the node's + address. + properties: + address: + description: The machine address. + type: string + type: + description: Machine address type, one of Hostname, ExternalIP + or InternalIP. + type: string + required: + - address + - type + type: object + type: array + failureMessage: + description: "FailureMessage will be set in the event that there is + a terminal problem reconciling the Machine and will contain a more + verbose string suitable for logging and human consumption. \n This + field should not be set for transitive errors that a controller + faces that are expected to be fixed automatically over time (like + service outages), but instead indicate that something is fundamentally + wrong with the Machine's spec or the configuration of the controller, + and that manual intervention is required. Examples of terminal errors + would be invalid combinations of settings in the spec, values that + are unsupported by the controller, or the responsible controller + itself being critically misconfigured. \n Any transient errors that + occur during the reconciliation of Machines can be added as events + to the Machine object and/or logged in the controller's output." + type: string + failureReason: + description: "FailureReason will be set in the event that there is + a terminal problem reconciling the Machine and will contain a succinct + value suitable for machine interpretation. \n This field should + not be set for transitive errors that a controller faces that are + expected to be fixed automatically over time (like service outages), + but instead indicate that something is fundamentally wrong with + the Machine's spec or the configuration of the controller, and that + manual intervention is required. Examples of terminal errors would + be invalid combinations of settings in the spec, values that are + unsupported by the controller, or the responsible controller itself + being critically misconfigured. \n Any transient errors that occur + during the reconciliation of Machines can be added as events to + the Machine object and/or logged in the controller's output." + type: string + network: + description: Network returns the network status for each of the machine's + configured network interfaces. + items: + description: NetworkStatus provides information about one of a VM's + networks. + properties: + connected: + description: Connected is a flag that indicates whether this + network is currently connected to the VM. + type: boolean + ipAddrs: + description: IPAddrs is one or more IP addresses reported by + vm-tools. + items: + type: string + type: array + macAddr: + description: MACAddr is the MAC address of the network device. + type: string + networkName: + description: NetworkName is the name of the network. + type: string + required: + - macAddr + type: object + type: array + ready: + description: Ready is true when the provider resource is ready. + type: boolean + type: object + type: object + served: true + storage: true + subresources: + status: {} +status: + acceptedNames: + kind: "" + plural: "" + conditions: [] + storedVersions: [] +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + cert-manager.io/inject-ca-from: capi-webhook-system/capv-serving-cert + controller-gen.kubebuilder.io/version: v0.2.6 + creationTimestamp: null + labels: + cluster.x-k8s.io/provider: infrastructure-vsphere + cluster.x-k8s.io/v1alpha3: v1alpha3 + name: vspheremachinetemplates.infrastructure.cluster.x-k8s.io +spec: + conversion: + strategy: Webhook + webhook: + clientConfig: + caBundle: Cg== + service: + name: capv-webhook-service + namespace: capi-webhook-system + path: /convert + conversionReviewVersions: + - v1 + - v1beta1 + group: infrastructure.cluster.x-k8s.io + names: + categories: + - cluster-api + kind: VSphereMachineTemplate + listKind: VSphereMachineTemplateList + plural: vspheremachinetemplates + singular: vspheremachinetemplate + scope: Namespaced + versions: + - name: v1alpha2 + schema: + openAPIV3Schema: + description: VSphereMachineTemplate is the Schema for the vspheremachinetemplates + API + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + description: VSphereMachineTemplateSpec defines the desired state of VSphereMachineTemplate + properties: + template: + description: VSphereMachineTemplateResource describes the data needed + to create a VSphereMachine from a template + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this + representation of an object. Servers should convert recognized + schemas to the latest internal value, and may reject unrecognized + values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource + this object represents. Servers may infer this from the endpoint + the client submits requests to. Cannot be updated. In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + description: Standard object's metadata. + properties: + annotations: + additionalProperties: + type: string + description: 'Annotations is an unstructured key value map + stored with a resource that may be set by external tools + to store and retrieve arbitrary metadata. They are not queryable + and should be preserved when modifying objects. More info: + http://kubernetes.io/docs/user-guide/annotations' + type: object + generateName: + description: "GenerateName is an optional prefix, used by + the server, to generate a unique name ONLY IF the Name field + has not been provided. If this field is used, the name returned + to the client will be different than the name passed. This + value will also be combined with a unique suffix. The provided + value has the same validation rules as the Name field, and + may be truncated by the length of the suffix required to + make the value unique on the server. \n If this field is + specified and the generated name exists, the server will + NOT return a 409 - instead, it will either return 201 Created + or 500 with Reason ServerTimeout indicating a unique name + could not be found in the time allotted, and the client + should retry (optionally after the time indicated in the + Retry-After header). \n Applied only if Name is not specified. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#idempotency" + type: string + labels: + additionalProperties: + type: string + description: 'Map of string keys and values that can be used + to organize and categorize (scope and select) objects. May + match selectors of replication controllers and services. + More info: http://kubernetes.io/docs/user-guide/labels' + type: object + name: + description: 'Name must be unique within a namespace. Is required + when creating resources, although some resources may allow + a client to request the generation of an appropriate name + automatically. Name is primarily intended for creation idempotence + and configuration definition. Cannot be updated. More info: + http://kubernetes.io/docs/user-guide/identifiers#names' + type: string + namespace: + description: "Namespace defines the space within each name + must be unique. An empty namespace is equivalent to the + \"default\" namespace, but \"default\" is the canonical + representation. Not all objects are required to be scoped + to a namespace - the value of this field for those objects + will be empty. \n Must be a DNS_LABEL. Cannot be updated. + More info: http://kubernetes.io/docs/user-guide/namespaces" + type: string + ownerReferences: + description: List of objects depended by this object. If ALL + objects in the list have been deleted, this object will + be garbage collected. If this object is managed by a controller, + then an entry in this list will point to this controller, + with the controller field set to true. There cannot be more + than one managing controller. + items: + description: OwnerReference contains enough information + to let you identify an owning object. An owning object + must be in the same namespace as the dependent, or be + cluster-scoped, so there is no namespace field. + properties: + apiVersion: + description: API version of the referent. + type: string + blockOwnerDeletion: + description: If true, AND if the owner has the "foregroundDeletion" + finalizer, then the owner cannot be deleted from the + key-value store until this reference is removed. Defaults + to false. To set this field, a user needs "delete" + permission of the owner, otherwise 422 (Unprocessable + Entity) will be returned. + type: boolean + controller: + description: If true, this reference points to the managing + controller. + type: boolean + kind: + description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + name: + description: 'Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names' + type: string + uid: + description: 'UID of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#uids' + type: string + required: + - apiVersion + - kind + - name + - uid + type: object + type: array + type: object + spec: + description: Spec is the specification of the desired behavior + of the machine. + properties: + datacenter: + description: Datacenter is the name or inventory path of the + datacenter where this machine's VM is created/located. + type: string + diskGiB: + description: DiskGiB is the size of a virtual machine's disk, + in GiB. Defaults to the analogue property value in the template + from which this machine is cloned. + format: int32 + type: integer + memoryMiB: + description: MemoryMiB is the size of a virtual machine's + memory, in MiB. Defaults to the analogue property value + in the template from which this machine is cloned. + format: int64 + type: integer + network: + description: Network is the network configuration for this + machine's VM. + properties: + devices: + description: Devices is the list of network devices used + by the virtual machine. TODO(akutz) Make sure at least + one network matches the ClusterSpec.CloudProviderConfiguration.Network.Name + items: + description: NetworkDeviceSpec defines the network configuration + for a virtual machine's network device. + properties: + deviceName: + description: DeviceName may be used to explicitly + assign a name to the network device as it exists + in the guest operating system. + type: string + dhcp4: + description: DHCP4 is a flag that indicates whether + or not to use DHCP for IPv4 on this device. If + true then IPAddrs should not contain any IPv4 + addresses. + type: boolean + dhcp6: + description: DHCP6 is a flag that indicates whether + or not to use DHCP for IPv6 on this device. If + true then IPAddrs should not contain any IPv6 + addresses. + type: boolean + gateway4: + description: Gateway4 is the IPv4 gateway used by + this device. Required when DHCP4 is false. + type: string + gateway6: + description: Gateway4 is the IPv4 gateway used by + this device. Required when DHCP6 is false. + type: string + ipAddrs: + description: IPAddrs is a list of one or more IPv4 + and/or IPv6 addresses to assign to this device. + Required when DHCP4 and DHCP6 are both false. + items: + type: string + type: array + macAddr: + description: MACAddr is the MAC address used by + this device. It is generally a good idea to omit + this field and allow a MAC address to be generated. + Please note that this value must use the VMware + OUI to work with the in-tree vSphere cloud provider. + type: string + mtu: + description: MTU is the device’s Maximum Transmission + Unit size in bytes. + format: int64 + type: integer + nameservers: + description: Nameservers is a list of IPv4 and/or + IPv6 addresses used as DNS nameservers. Please + note that Linux allows only three nameservers + (https://linux.die.net/man/5/resolv.conf). + items: + type: string + type: array + networkName: + description: NetworkName is the name of the vSphere + network to which the device will be connected. + type: string + routes: + description: Routes is a list of optional, static + routes applied to the device. + items: + description: NetworkRouteSpec defines a static + network route. + properties: + metric: + description: Metric is the weight/priority + of the route. + format: int32 + type: integer + to: + description: To is an IPv4 or IPv6 address. + type: string + via: + description: Via is an IPv4 or IPv6 address. + type: string + required: + - metric + - to + - via + type: object + type: array + searchDomains: + description: SearchDomains is a list of search domains + used when resolving IP addresses with DNS. + items: + type: string + type: array + required: + - networkName + type: object + type: array + preferredAPIServerCidr: + description: PreferredAPIServeCIDR is the preferred CIDR + for the Kubernetes API server endpoint on this machine + type: string + routes: + description: Routes is a list of optional, static routes + applied to the virtual machine. + items: + description: NetworkRouteSpec defines a static network + route. + properties: + metric: + description: Metric is the weight/priority of the + route. + format: int32 + type: integer + to: + description: To is an IPv4 or IPv6 address. + type: string + via: + description: Via is an IPv4 or IPv6 address. + type: string + required: + - metric + - to + - via + type: object + type: array + required: + - devices + type: object + numCPUs: + description: NumCPUs is the number of virtual processors in + a virtual machine. Defaults to the analogue property value + in the template from which this machine is cloned. + format: int32 + type: integer + numCoresPerSocket: + description: NumCPUs is the number of cores among which to + distribute CPUs in this virtual machine. Defaults to the + analogue property value in the template from which this + machine is cloned. + format: int32 + type: integer + providerID: + description: ProviderID is the virtual machine's BIOS UUID + formated as vsphere://12345678-1234-1234-1234-123456789abc + type: string + template: + description: Template is the name, inventory path, or instance + UUID of the template used to clone new machines. + type: string + required: + - datacenter + - network + - template + type: object + required: + - spec + type: object + required: + - template + type: object + type: object + served: true + storage: false + - name: v1alpha3 + schema: + openAPIV3Schema: + description: VSphereMachineTemplate is the Schema for the vspheremachinetemplates + API + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + description: VSphereMachineTemplateSpec defines the desired state of VSphereMachineTemplate + properties: + template: + description: VSphereMachineTemplateResource describes the data needed + to create a VSphereMachine from a template + properties: + spec: + description: Spec is the specification of the desired behavior + of the machine. + properties: + cloneMode: + description: CloneMode specifies the type of clone operation. + The LinkedClone mode is only support for templates that + have at least one snapshot. If the template has no snapshots, + then CloneMode defaults to FullClone. When LinkedClone mode + is enabled the DiskGiB field is ignored as it is not possible + to expand disks of linked clones. Defaults to LinkedClone, + but fails gracefully to FullClone if the source of the clone + operation has no snapshots. + type: string + datacenter: + description: Datacenter is the name or inventory path of the + datacenter in which the virtual machine is created/located. + type: string + datastore: + description: Datastore is the name or inventory path of the + datastore in which the virtual machine is created/located. + type: string + diskGiB: + description: DiskGiB is the size of a virtual machine's disk, + in GiB. Defaults to the eponymous property value in the + template from which the virtual machine is cloned. + format: int32 + type: integer + folder: + description: Folder is the name or inventory path of the folder + in which the virtual machine is created/located. + type: string + memoryMiB: + description: MemoryMiB is the size of a virtual machine's + memory, in MiB. Defaults to the eponymous property value + in the template from which the virtual machine is cloned. + format: int64 + type: integer + network: + description: Network is the network configuration for this + machine's VM. + properties: + devices: + description: Devices is the list of network devices used + by the virtual machine. TODO(akutz) Make sure at least + one network matches the ClusterSpec.CloudProviderConfiguration.Network.Name + items: + description: NetworkDeviceSpec defines the network configuration + for a virtual machine's network device. + properties: + deviceName: + description: DeviceName may be used to explicitly + assign a name to the network device as it exists + in the guest operating system. + type: string + dhcp4: + description: DHCP4 is a flag that indicates whether + or not to use DHCP for IPv4 on this device. If + true then IPAddrs should not contain any IPv4 + addresses. + type: boolean + dhcp6: + description: DHCP6 is a flag that indicates whether + or not to use DHCP for IPv6 on this device. If + true then IPAddrs should not contain any IPv6 + addresses. + type: boolean + gateway4: + description: Gateway4 is the IPv4 gateway used by + this device. Required when DHCP4 is false. + type: string + gateway6: + description: Gateway4 is the IPv4 gateway used by + this device. Required when DHCP6 is false. + type: string + ipAddrs: + description: IPAddrs is a list of one or more IPv4 + and/or IPv6 addresses to assign to this device. + Required when DHCP4 and DHCP6 are both false. + items: + type: string + type: array + macAddr: + description: MACAddr is the MAC address used by + this device. It is generally a good idea to omit + this field and allow a MAC address to be generated. + Please note that this value must use the VMware + OUI to work with the in-tree vSphere cloud provider. + type: string + mtu: + description: MTU is the device’s Maximum Transmission + Unit size in bytes. + format: int64 + type: integer + nameservers: + description: Nameservers is a list of IPv4 and/or + IPv6 addresses used as DNS nameservers. Please + note that Linux allows only three nameservers + (https://linux.die.net/man/5/resolv.conf). + items: + type: string + type: array + networkName: + description: NetworkName is the name of the vSphere + network to which the device will be connected. + type: string + routes: + description: Routes is a list of optional, static + routes applied to the device. + items: + description: NetworkRouteSpec defines a static + network route. + properties: + metric: + description: Metric is the weight/priority + of the route. + format: int32 + type: integer + to: + description: To is an IPv4 or IPv6 address. + type: string + via: + description: Via is an IPv4 or IPv6 address. + type: string + required: + - metric + - to + - via + type: object + type: array + searchDomains: + description: SearchDomains is a list of search domains + used when resolving IP addresses with DNS. + items: + type: string + type: array + required: + - networkName + type: object + type: array + preferredAPIServerCidr: + description: PreferredAPIServeCIDR is the preferred CIDR + for the Kubernetes API server endpoint on this machine + type: string + routes: + description: Routes is a list of optional, static routes + applied to the virtual machine. + items: + description: NetworkRouteSpec defines a static network + route. + properties: + metric: + description: Metric is the weight/priority of the + route. + format: int32 + type: integer + to: + description: To is an IPv4 or IPv6 address. + type: string + via: + description: Via is an IPv4 or IPv6 address. + type: string + required: + - metric + - to + - via + type: object + type: array + required: + - devices + type: object + numCPUs: + description: NumCPUs is the number of virtual processors in + a virtual machine. Defaults to the eponymous property value + in the template from which the virtual machine is cloned. + format: int32 + type: integer + numCoresPerSocket: + description: NumCPUs is the number of cores among which to + distribute CPUs in this virtual machine. Defaults to the + eponymous property value in the template from which the + virtual machine is cloned. + format: int32 + type: integer + providerID: + description: ProviderID is the virtual machine's BIOS UUID + formated as vsphere://12345678-1234-1234-1234-123456789abc + type: string + resourcePool: + description: ResourcePool is the name or inventory path of + the resource pool in which the virtual machine is created/located. + type: string + server: + description: Server is the IP address or FQDN of the vSphere + server on which the virtual machine is created/located. + type: string + snapshot: + description: Snapshot is the name of the snapshot from which + to create a linked clone. This field is ignored if LinkedClone + is not enabled. Defaults to the source's current snapshot. + type: string + template: + description: Template is the name or inventory path of the + template used to clone the virtual machine. + type: string + required: + - network + - template + type: object + required: + - spec + type: object + required: + - template + type: object + type: object + served: true + storage: true +status: + acceptedNames: + kind: "" + plural: "" + conditions: [] + storedVersions: [] +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + cert-manager.io/inject-ca-from: capi-webhook-system/capv-serving-cert + controller-gen.kubebuilder.io/version: v0.2.6 + creationTimestamp: null + labels: + cluster.x-k8s.io/provider: infrastructure-vsphere + cluster.x-k8s.io/v1alpha3: v1alpha3 + name: vspherevms.infrastructure.cluster.x-k8s.io +spec: + conversion: + strategy: Webhook + webhook: + clientConfig: + caBundle: Cg== + service: + name: capv-webhook-service + namespace: capi-webhook-system + path: /convert + conversionReviewVersions: + - v1 + - v1beta1 + group: infrastructure.cluster.x-k8s.io + names: + kind: VSphereVM + listKind: VSphereVMList + plural: vspherevms + singular: vspherevm + scope: Namespaced + versions: + - name: v1alpha3 + schema: + openAPIV3Schema: + description: VSphereVM is the Schema for the vspherevms API + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + description: VSphereVMSpec defines the desired state of VSphereVM. + properties: + biosUUID: + description: BiosUUID is the the VM's BIOS UUID that is assigned at + runtime after the VM has been created. This field is required at + runtime for other controllers that read this CRD as unstructured + data. + type: string + bootstrapRef: + description: BootstrapRef is a reference to a bootstrap provider-specific + resource that holds configuration details. This field is optional + in case no bootstrap data is required to create a VM. + properties: + apiVersion: + description: API version of the referent. + type: string + fieldPath: + description: 'If referring to a piece of an object instead of + an entire object, this string should contain a valid JSON/Go + field access statement, such as desiredState.manifest.containers[2]. + For example, if the object reference is to a container within + a pod, this would take on a value like: "spec.containers{name}" + (where "name" refers to the name of the container that triggered + the event) or if no container name is specified "spec.containers[2]" + (container with index 2 in this pod). This syntax is chosen + only to have some well-defined way of referencing a part of + an object. TODO: this design is not final and this field is + subject to change in the future.' + type: string + kind: + description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + type: string + namespace: + description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' + type: string + resourceVersion: + description: 'Specific resourceVersion to which this reference + is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency' + type: string + uid: + description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids' + type: string + type: object + cloneMode: + description: CloneMode specifies the type of clone operation. The + LinkedClone mode is only support for templates that have at least + one snapshot. If the template has no snapshots, then CloneMode defaults + to FullClone. When LinkedClone mode is enabled the DiskGiB field + is ignored as it is not possible to expand disks of linked clones. + Defaults to LinkedClone, but fails gracefully to FullClone if the + source of the clone operation has no snapshots. + type: string + datacenter: + description: Datacenter is the name or inventory path of the datacenter + in which the virtual machine is created/located. + type: string + datastore: + description: Datastore is the name or inventory path of the datastore + in which the virtual machine is created/located. + type: string + diskGiB: + description: DiskGiB is the size of a virtual machine's disk, in GiB. + Defaults to the eponymous property value in the template from which + the virtual machine is cloned. + format: int32 + type: integer + folder: + description: Folder is the name or inventory path of the folder in + which the virtual machine is created/located. + type: string + memoryMiB: + description: MemoryMiB is the size of a virtual machine's memory, + in MiB. Defaults to the eponymous property value in the template + from which the virtual machine is cloned. + format: int64 + type: integer + network: + description: Network is the network configuration for this machine's + VM. + properties: + devices: + description: Devices is the list of network devices used by the + virtual machine. TODO(akutz) Make sure at least one network + matches the ClusterSpec.CloudProviderConfiguration.Network.Name + items: + description: NetworkDeviceSpec defines the network configuration + for a virtual machine's network device. + properties: + deviceName: + description: DeviceName may be used to explicitly assign + a name to the network device as it exists in the guest + operating system. + type: string + dhcp4: + description: DHCP4 is a flag that indicates whether or not + to use DHCP for IPv4 on this device. If true then IPAddrs + should not contain any IPv4 addresses. + type: boolean + dhcp6: + description: DHCP6 is a flag that indicates whether or not + to use DHCP for IPv6 on this device. If true then IPAddrs + should not contain any IPv6 addresses. + type: boolean + gateway4: + description: Gateway4 is the IPv4 gateway used by this device. + Required when DHCP4 is false. + type: string + gateway6: + description: Gateway4 is the IPv4 gateway used by this device. + Required when DHCP6 is false. + type: string + ipAddrs: + description: IPAddrs is a list of one or more IPv4 and/or + IPv6 addresses to assign to this device. Required when + DHCP4 and DHCP6 are both false. + items: + type: string + type: array + macAddr: + description: MACAddr is the MAC address used by this device. + It is generally a good idea to omit this field and allow + a MAC address to be generated. Please note that this value + must use the VMware OUI to work with the in-tree vSphere + cloud provider. + type: string + mtu: + description: MTU is the device’s Maximum Transmission Unit + size in bytes. + format: int64 + type: integer + nameservers: + description: Nameservers is a list of IPv4 and/or IPv6 addresses + used as DNS nameservers. Please note that Linux allows + only three nameservers (https://linux.die.net/man/5/resolv.conf). + items: + type: string + type: array + networkName: + description: NetworkName is the name of the vSphere network + to which the device will be connected. + type: string + routes: + description: Routes is a list of optional, static routes + applied to the device. + items: + description: NetworkRouteSpec defines a static network + route. + properties: + metric: + description: Metric is the weight/priority of the + route. + format: int32 + type: integer + to: + description: To is an IPv4 or IPv6 address. + type: string + via: + description: Via is an IPv4 or IPv6 address. + type: string + required: + - metric + - to + - via + type: object + type: array + searchDomains: + description: SearchDomains is a list of search domains used + when resolving IP addresses with DNS. + items: + type: string + type: array + required: + - networkName + type: object + type: array + preferredAPIServerCidr: + description: PreferredAPIServeCIDR is the preferred CIDR for the + Kubernetes API server endpoint on this machine + type: string + routes: + description: Routes is a list of optional, static routes applied + to the virtual machine. + items: + description: NetworkRouteSpec defines a static network route. + properties: + metric: + description: Metric is the weight/priority of the route. + format: int32 + type: integer + to: + description: To is an IPv4 or IPv6 address. + type: string + via: + description: Via is an IPv4 or IPv6 address. + type: string + required: + - metric + - to + - via + type: object + type: array + required: + - devices + type: object + numCPUs: + description: NumCPUs is the number of virtual processors in a virtual + machine. Defaults to the eponymous property value in the template + from which the virtual machine is cloned. + format: int32 + type: integer + numCoresPerSocket: + description: NumCPUs is the number of cores among which to distribute + CPUs in this virtual machine. Defaults to the eponymous property + value in the template from which the virtual machine is cloned. + format: int32 + type: integer + resourcePool: + description: ResourcePool is the name or inventory path of the resource + pool in which the virtual machine is created/located. + type: string + server: + description: Server is the IP address or FQDN of the vSphere server + on which the virtual machine is created/located. + type: string + snapshot: + description: Snapshot is the name of the snapshot from which to create + a linked clone. This field is ignored if LinkedClone is not enabled. + Defaults to the source's current snapshot. + type: string + template: + description: Template is the name or inventory path of the template + used to clone the virtual machine. + type: string + required: + - network + - template + type: object + status: + description: VSphereVMStatus defines the observed state of VSphereVM + properties: + addresses: + description: Addresses is a list of the VM's IP addresses. This field + is required at runtime for other controllers that read this CRD + as unstructured data. + items: + type: string + type: array + cloneMode: + description: CloneMode is the type of clone operation used to clone + this VM. Since LinkedMode is the default but fails gracefully if + the source of the clone has no snapshots, this field may be used + to determine the actual type of clone operation used to create this + VM. + type: string + failureMessage: + description: "FailureMessage will be set in the event that there is + a terminal problem reconciling the vspherevm and will contain a + more verbose string suitable for logging and human consumption. + \n This field should not be set for transitive errors that a controller + faces that are expected to be fixed automatically over time (like + service outages), but instead indicate that something is fundamentally + wrong with the vm. \n Any transient errors that occur during the + reconciliation of vspherevms can be added as events to the vspherevm + object and/or logged in the controller's output." + type: string + failureReason: + description: "FailureReason will be set in the event that there is + a terminal problem reconciling the vspherevm and will contain a + succinct value suitable for vm interpretation. \n This field should + not be set for transitive errors that a controller faces that are + expected to be fixed automatically over time (like service outages), + but instead indicate that something is fundamentally wrong with + the vm. \n Any transient errors that occur during the reconciliation + of vspherevms can be added as events to the vspherevm object and/or + logged in the controller's output." + type: string + network: + description: Network returns the network status for each of the machine's + configured network interfaces. + items: + description: NetworkStatus provides information about one of a VM's + networks. + properties: + connected: + description: Connected is a flag that indicates whether this + network is currently connected to the VM. + type: boolean + ipAddrs: + description: IPAddrs is one or more IP addresses reported by + vm-tools. + items: + type: string + type: array + macAddr: + description: MACAddr is the MAC address of the network device. + type: string + networkName: + description: NetworkName is the name of the network. + type: string + required: + - macAddr + type: object + type: array + ready: + description: Ready is true when the provider resource is ready. This + field is required at runtime for other controllers that read this + CRD as unstructured data. + type: boolean + snapshot: + description: Snapshot is the name of the snapshot from which the VM + was cloned if LinkedMode is enabled. + type: string + taskRef: + description: TaskRef is a managed object reference to a Task related + to the machine. This value is set automatically at runtime and should + not be set or modified by users. + type: string + type: object + type: object + served: true + storage: true + subresources: + status: {} +status: + acceptedNames: + kind: "" + plural: "" + conditions: [] + storedVersions: [] +--- +apiVersion: v1 +kind: Service +metadata: + labels: + cluster.x-k8s.io/provider: infrastructure-vsphere + name: capv-webhook-service + namespace: capi-webhook-system +spec: + ports: + - port: 443 + targetPort: webhook-server + selector: + cluster.x-k8s.io/provider: infrastructure-vsphere +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + cluster.x-k8s.io/provider: infrastructure-vsphere + control-plane: controller-manager + name: capv-controller-manager + namespace: capi-webhook-system +spec: + replicas: 1 + selector: + matchLabels: + cluster.x-k8s.io/provider: infrastructure-vsphere + control-plane: controller-manager + template: + metadata: + labels: + cluster.x-k8s.io/provider: infrastructure-vsphere + control-plane: controller-manager + spec: + containers: + - args: + - --secure-listen-address=0.0.0.0:8443 + - --upstream=http://127.0.0.1:8080/ + - --logtostderr=true + - --v=10 + image: gcr.io/kubebuilder/kube-rbac-proxy:v0.4.0 + name: kube-rbac-proxy + ports: + - containerPort: 8443 + name: https + - args: + - --metrics-addr=127.0.0.1:8080 + - --webhook-port=9443 + - --enable-leader-election=false + image: gcr.io/cluster-api-provider-vsphere/release/manager:latest + imagePullPolicy: IfNotPresent + livenessProbe: + httpGet: + path: /healthz + port: healthz + name: manager + ports: + - containerPort: 9443 + name: webhook-server + protocol: TCP + - containerPort: 9440 + name: healthz + protocol: TCP + readinessProbe: + httpGet: + path: /readyz + port: healthz + volumeMounts: + - mountPath: /tmp/k8s-webhook-server/serving-certs + name: cert + readOnly: true + terminationGracePeriodSeconds: 10 + tolerations: + - effect: NoSchedule + key: node-role.kubernetes.io/master + volumes: + - name: cert + secret: + defaultMode: 420 + secretName: capv-webhook-service-cert +--- +apiVersion: cert-manager.io/v1alpha2 +kind: Certificate +metadata: + labels: + cluster.x-k8s.io/provider: infrastructure-vsphere + name: capv-serving-cert + namespace: capi-webhook-system +spec: + dnsNames: + - capv-webhook-service.capi-webhook-system.svc + - capv-webhook-service.capi-webhook-system.svc.cluster.local + issuerRef: + kind: Issuer + name: capv-selfsigned-issuer + secretName: capv-webhook-service-cert +--- +apiVersion: cert-manager.io/v1alpha2 +kind: Issuer +metadata: + labels: + cluster.x-k8s.io/provider: infrastructure-vsphere + name: capv-selfsigned-issuer + namespace: capi-webhook-system +spec: + selfSigned: {} diff --git a/spectro/global/kustomization.yaml b/spectro/global/kustomization.yaml new file mode 100644 index 0000000000..09fb55a891 --- /dev/null +++ b/spectro/global/kustomization.yaml @@ -0,0 +1,40 @@ +namePrefix: capv- + +commonLabels: + cluster.x-k8s.io/provider: "infrastructure-vsphere" + +bases: + - ../../config/crd + - ../../config/webhook # Disable this if you're not using the webhook functionality. + +patchesJson6902: + - target: # NOTE: This patch needs to be repeatd for EACH CustomResourceDefinition you have under crd/bases. + group: apiextensions.k8s.io + version: v1 + kind: CustomResourceDefinition + name: haproxyloadbalancers.infrastructure.cluster.x-k8s.io + path: patch_crd_webhook_namespace.yaml + - target: # NOTE: This patch needs to be repeatd for EACH CustomResourceDefinition you have under crd/bases. + group: apiextensions.k8s.io + version: v1 + kind: CustomResourceDefinition + name: vsphereclusters.infrastructure.cluster.x-k8s.io + path: patch_crd_webhook_namespace.yaml + - target: # NOTE: This patch needs to be repeatd for EACH CustomResourceDefinition you have under crd/bases. + group: apiextensions.k8s.io + version: v1 + kind: CustomResourceDefinition + name: vspheremachines.infrastructure.cluster.x-k8s.io + path: patch_crd_webhook_namespace.yaml + - target: # NOTE: This patch needs to be repeatd for EACH CustomResourceDefinition you have under crd/bases. + group: apiextensions.k8s.io + version: v1 + kind: CustomResourceDefinition + name: vspheremachinetemplates.infrastructure.cluster.x-k8s.io + path: patch_crd_webhook_namespace.yaml + - target: # NOTE: This patch needs to be repeatd for EACH CustomResourceDefinition you have under crd/bases. + group: apiextensions.k8s.io + version: v1 + kind: CustomResourceDefinition + name: vspherevms.infrastructure.cluster.x-k8s.io + path: patch_crd_webhook_namespace.yaml diff --git a/spectro/global/patch_crd_webhook_namespace.yaml b/spectro/global/patch_crd_webhook_namespace.yaml new file mode 100644 index 0000000000..110f3a4945 --- /dev/null +++ b/spectro/global/patch_crd_webhook_namespace.yaml @@ -0,0 +1,3 @@ +- op: replace + path: "/spec/conversion/webhook/clientConfig/service/namespace" + value: capi-webhook-system diff --git a/spectro/run.sh b/spectro/run.sh new file mode 100755 index 0000000000..5cc64b38a6 --- /dev/null +++ b/spectro/run.sh @@ -0,0 +1,6 @@ +#!/bin/bash + +rm generated/* + +kustomize build base > ./generated/core-base.yaml +kustomize build global > ./generated/core-global.yaml