-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
eb90fcf
commit 00ae751
Showing
8 changed files
with
353 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1 @@ | ||
--- | ||
- prompt: "Target (hosts/group) name?" | ||
kind: ask | ||
name: targets | ||
type: string | ||
minLength: 3 | ||
maxLength: 20 | ||
|
||
- prompt: "Pipelinerun namespace?" | ||
name: pipelineRunNamespace | ||
options: | ||
- "tekton-pipelines" | ||
|
||
- prompt: "IP/FQDN?" | ||
kind: ask | ||
name: ip | ||
type: string | ||
minLength: 3 | ||
maxLength: 20 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,150 @@ | ||
--- | ||
apiVersion: apiextensions.crossplane.io/v1 | ||
kind: Composition | ||
metadata: | ||
name: vsphere-vm | ||
labels: | ||
crossplane.io/xrd: xvspherevms.resources.stuttgart-things.com | ||
spec: | ||
compositeTypeRef: | ||
apiVersion: resources.stuttgart-things.com/v1alpha1 | ||
kind: XVsphereVM | ||
resources: | ||
- name: vsphere-vm | ||
base: | ||
kind: Workspace | ||
apiVersion: tf.upbound.io/v1beta1 | ||
metadata: | ||
annotations: | ||
crossplane.io/external-name: vspherevm | ||
spec: | ||
providerConfigRef: | ||
name: terraform-default | ||
writeConnectionSecretToRef: | ||
name: vsphere-vm-test | ||
namespace: crossplane-system | ||
forProvider: | ||
source: Remote | ||
module: git::https://github.com/stuttgart-things/vsphere-vm.git?ref=v1.7.5-2.7.0 | ||
vars: | ||
- key: vm_count | ||
type: integer | ||
value: "1" | ||
- key: vsphere_vm_name | ||
type: string | ||
- key: vm_memory | ||
type: integer | ||
value: "4096" | ||
- key: vm_disk_size | ||
type: integer | ||
value: "64" | ||
- key: vm_num_cpus | ||
type: integer | ||
value: "4" | ||
- key: firmware | ||
type: string | ||
value: bios | ||
- key: vsphere_vm_folder_path | ||
type: string | ||
- key: vsphere_datacenter | ||
type: string | ||
- key: vsphere_datastore | ||
type: string | ||
- key: vsphere_resource_pool | ||
type: string | ||
- key: vsphere_network | ||
type: string | ||
- key: vsphere_vm_template | ||
type: string | ||
- key: bootstrap | ||
type: string | ||
value: '["echo STUTTGART-THINGS"]' | ||
- key: annotation | ||
type: string | ||
value: VSPHERE-VM BUILD w/ CROSSPLANE FOR STUTTGART-THINGS | ||
- key: unverified_ssl | ||
type: string | ||
value: "true" | ||
varFiles: | ||
- source: SecretKey | ||
secretKeyRef: | ||
namespace: default | ||
name: vsphere-tfvars | ||
key: terraform.tfvars | ||
patches: | ||
- type: CombineFromComposite | ||
combine: | ||
variables: | ||
- fromFieldPath: spec.vm.name | ||
strategy: string | ||
string: | ||
fmt: "vspherevm-%s" | ||
toFieldPath: "metadata.annotations[crossplane.io/external-name]" | ||
- type: FromCompositeFieldPath | ||
fromFieldPath: spec.vm.count | ||
toFieldPath: spec.forProvider.vars[0].value | ||
- type: FromCompositeFieldPath | ||
fromFieldPath: spec.vm.name | ||
toFieldPath: spec.forProvider.vars[1].value | ||
- type: FromCompositeFieldPath | ||
fromFieldPath: spec.vm.ram | ||
toFieldPath: spec.forProvider.vars[2].value | ||
- type: FromCompositeFieldPath | ||
fromFieldPath: spec.vm.disk | ||
toFieldPath: spec.forProvider.vars[3].value | ||
- type: FromCompositeFieldPath | ||
fromFieldPath: spec.vm.cpu | ||
toFieldPath: spec.forProvider.vars[4].value | ||
- type: FromCompositeFieldPath | ||
fromFieldPath: spec.vm.firmware | ||
toFieldPath: spec.forProvider.vars[5].value | ||
- type: FromCompositeFieldPath | ||
fromFieldPath: spec.vm.folderPath | ||
toFieldPath: spec.forProvider.vars[6].value | ||
- type: FromCompositeFieldPath | ||
fromFieldPath: spec.vm.datacenter | ||
toFieldPath: spec.forProvider.vars[7].value | ||
- type: FromCompositeFieldPath | ||
fromFieldPath: spec.vm.datastore | ||
toFieldPath: spec.forProvider.vars[8].value | ||
- type: FromCompositeFieldPath | ||
fromFieldPath: spec.vm.resourcePool | ||
toFieldPath: spec.forProvider.vars[9].value | ||
- type: FromCompositeFieldPath | ||
fromFieldPath: spec.vm.network | ||
toFieldPath: spec.forProvider.vars[10].value | ||
- type: FromCompositeFieldPath | ||
fromFieldPath: spec.vm.template | ||
toFieldPath: spec.forProvider.vars[11].value | ||
- type: FromCompositeFieldPath | ||
fromFieldPath: spec.vm.bootstrap | ||
toFieldPath: spec.forProvider.vars[12].value | ||
- type: FromCompositeFieldPath | ||
fromFieldPath: spec.vm.annotation | ||
toFieldPath: spec.forProvider.vars[13].value | ||
- type: FromCompositeFieldPath | ||
fromFieldPath: spec.vm.unverifiedSsl | ||
toFieldPath: spec.forProvider.vars[14].value | ||
- type: FromCompositeFieldPath | ||
fromFieldPath: spec.tfvars.secretName | ||
toFieldPath: spec.forProvider.varFiles[0].secretKeyRef.name | ||
- type: FromCompositeFieldPath | ||
fromFieldPath: spec.tfvars.secretNamespace | ||
toFieldPath: spec.forProvider.varFiles[0].secretKeyRef.namespace | ||
- type: FromCompositeFieldPath | ||
fromFieldPath: spec.tfvars.secretKey | ||
toFieldPath: spec.forProvider.varFiles[0].secretKeyRef.key | ||
- type: FromCompositeFieldPath | ||
fromFieldPath: spec.connectionSecret.name | ||
toFieldPath: spec.writeConnectionSecretToRef.name | ||
- type: FromCompositeFieldPath | ||
fromFieldPath: spec.connectionSecret.namespace | ||
toFieldPath: spec.writeConnectionSecretToRef.namespace | ||
- type: FromCompositeFieldPath | ||
fromFieldPath: spec.providerRef.name | ||
toFieldPath: spec.providerConfigRef.name | ||
- type: ToCompositeFieldPath | ||
fromFieldPath: status.atProvider.outputs.ip | ||
toFieldPath: status.share.ip | ||
policy: | ||
fromFieldPath: Optional |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,119 @@ | ||
--- | ||
apiVersion: apiextensions.crossplane.io/v1 | ||
kind: CompositeResourceDefinition | ||
metadata: | ||
name: xvspherevms.resources.stuttgart-things.com | ||
spec: | ||
group: resources.stuttgart-things.com | ||
names: | ||
kind: XVsphereVM | ||
plural: xvspherevms | ||
claimNames: | ||
kind: VsphereVM | ||
plural: vspherevms | ||
versions: | ||
- name: v1alpha1 | ||
served: true | ||
referenceable: true | ||
schema: | ||
openAPIV3Schema: | ||
type: object | ||
properties: | ||
spec: | ||
type: object | ||
properties: | ||
vm: | ||
type: object | ||
properties: | ||
count: | ||
type: string | ||
default: "1" | ||
name: | ||
type: string | ||
ram: | ||
type: string | ||
default: "4096" | ||
disk: | ||
type: string | ||
default: "64" | ||
cpu: | ||
type: string | ||
default: "4" | ||
firmware: | ||
type: string | ||
default: "bios" | ||
folderPath: | ||
type: string | ||
datacenter: | ||
type: string | ||
datastore: | ||
type: string | ||
resourcePool: | ||
type: string | ||
network: | ||
type: string | ||
template: | ||
type: string | ||
bootstrap: | ||
type: string | ||
default: '["echo STUTTGART-THINGS"]' | ||
annotation: | ||
type: string | ||
default: VSPHERE-VM BUILD w/ CROSSPLANE FOR STUTTGART-THINGS | ||
unverifiedSsl: | ||
type: string | ||
default: "true" | ||
required: | ||
- name | ||
- ram | ||
- disk | ||
- cpu | ||
- folderPath | ||
- datacenter | ||
- datastore | ||
- resourcePool | ||
- network | ||
- template | ||
tfvars: | ||
type: object | ||
properties: | ||
secretName: | ||
type: string | ||
secretNamespace: | ||
type: string | ||
default: default | ||
secretKey: | ||
type: string | ||
default: terraform.tfvars | ||
required: | ||
- secretName | ||
connectionSecret: | ||
type: object | ||
properties: | ||
name: | ||
type: string | ||
namespace: | ||
type: string | ||
default: default | ||
required: | ||
- name | ||
providerRef: | ||
type: object | ||
properties: | ||
name: | ||
type: string | ||
required: | ||
- name | ||
required: | ||
- vm | ||
- tfvars | ||
- connectionSecret | ||
- providerRef | ||
status: | ||
description: A Status represents the observed state | ||
properties: | ||
share: | ||
description: Freeform field containing status information | ||
type: object | ||
x-kubernetes-preserve-unknown-fields: true | ||
type: object |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
--- | ||
apiVersion: meta.pkg.crossplane.io/v1 | ||
kind: Configuration | ||
metadata: | ||
name: vsphere-vm | ||
annotations: | ||
meta.crossplane.io/maintainer: [email protected] | ||
meta.crossplane.io/source: github.com/stuttgart-things/crossplane | ||
meta.crossplane.io/license: Apache-2.0 | ||
meta.crossplane.io/description: | | ||
creates vsphere-vm with crossplane based on terraform (provider) | ||
meta.crossplane.io/readme: | | ||
creates vsphere-vm with crossplane based on terraform (provider) | ||
spec: | ||
crossplane: | ||
version: ">=v1.14.1-0" | ||
dependsOn: | ||
- provider: xpkg.upbound.io/crossplane-contrib/provider-helm | ||
version: ">=v0.19.0" | ||
- provider: xpkg.upbound.io/crossplane-contrib/provider-kubernetes | ||
version: ">=v0.14.1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
apiVersion: resources.stuttgart-things.com/v1alpha1 | ||
kind: VsphereVM | ||
metadata: | ||
name: xplane-new | ||
namespace: crossplane-system | ||
spec: | ||
providerRef: | ||
name: vsphere-vm | ||
vm: | ||
count: "1" | ||
name: xplane-new | ||
cpu: "8" | ||
ram: "4096" | ||
disk: "64" | ||
firmware: bios | ||
folderPath: stuttgart-things/testing | ||
datacenter: /LabUL | ||
datastore: /LabUL/datastore/UL-ESX-SAS-01 | ||
resourcePool: /LabUL/host/Cluster-V6.5/Resources | ||
network: /LabUL/network/LAB-10.31.103 | ||
template: sthings-u24 | ||
bootstrap: '["echo STUTTGART-THINGS"]' | ||
annotation: VSPHERE-VM BUILD w/ CROSSPLANE FOR STUTTGART-THINGS | ||
unverifiedSsl: "true" | ||
tfvars: | ||
secretName: vsphere-tfvars # pragma: allowlist secret | ||
secretNamespace: crossplane-system # pragma: allowlist secret | ||
secretKey: terraform.tfvars # pragma: allowlist secret | ||
connectionSecret: | ||
name: xplane-new | ||
namespace: crossplane-system | ||
compositionRef: | ||
name: vsphere-vm |
Oops, something went wrong.