Skip to content
This repository has been archived by the owner on Feb 11, 2025. It is now read-only.

Commit

Permalink
add examples for vlans and attachments
Browse files Browse the repository at this point in the history
Signed-off-by: Marques Johansson <mjohansson@equinix.com>
  • Loading branch information
displague committed Jun 8, 2021
1 parent d24ee2d commit 43ae6da
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 14 deletions.
14 changes: 14 additions & 0 deletions cluster/examples/assignment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
apiVersion: ports.metal.equinix.com/v1alpha1
kind: Assignment
metadata:
name: crossplane-example-eth1-xp-vlan
spec:
forProvider:
deviceIdRef:
name: crossplane-example
virtualNetworkIdRef:
name: xp-vlan
name: eth1
providerRef:
name: equinix-metal-provider
22 changes: 14 additions & 8 deletions cluster/examples/device.yaml
Original file line number Diff line number Diff line change
@@ -1,17 +1,23 @@
---
apiVersion: server.metal.equinix.com/v1alpha2
kind: Device
metadata:
name: devicea
namespace: app-project1-dev
name: crossplane-example
spec:
forProvider:
hostname: crossplane
plan: c1.small.x86
facility: any
locked: false
operatingSystem: centos_7
hostname: crossplane-example
plan: c3.small.x86
facility: sv15
operatingSystem: ubuntu_20_04
billingCycle: hourly
hardware_reservation_id: next_available
locked: false
networkType: hybrid
tags:
- crossplane
providerRef:
name: equinix-metal-provider
writeConnectionSecretToRef:
name: devicea-conn
name: crossplane-example
namespace: crossplane-system
reclaimPolicy: Delete
4 changes: 2 additions & 2 deletions cluster/examples/provider.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env bash

export BASE64ENCODED_PACKET_PROVIDER_CREDS=$(base64 credentials.txt | tr -d "\n")
sed "s/BASE64ENCODED_PACKET_PROVIDER_CREDS/$BASE64ENCODED_PACKET_PROVIDER_CREDS/g" provider.yaml | kubectl create -f -
export BASE64ENCODED_METAL_PROVIDER_CREDS=$(base64 credentials.txt | tr -d "\n")
sed "s/BASE64ENCODED_METAL_PROVIDER_CREDS/$BASE64ENCODED_METAL_PROVIDER_CREDS/g" provider.yaml | kubectl create -f -
8 changes: 4 additions & 4 deletions cluster/examples/provider.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@ apiVersion: v1
kind: Secret
metadata:
name: example-provider-equinix-metal
namespace: packet-infra-dev
namespace: crossplane-system
type: Opaque
data:
credentials: BASE64ENCODED_PACKET_PROVIDER_CREDS
credentials: BASE64ENCODED_METAL_PROVIDER_CREDS
---
apiVersion: metal.equinix.com/v1beta1
kind: ProviderConfig
metadata:
name: default
name: equinix-metal-provider
spec:
credentialsSecretRef:
name: example-provider-equinix-metal
namespace: packet-infra-dev
namespace: crossplane-system
key: credentials
11 changes: 11 additions & 0 deletions cluster/examples/virtualnetwork.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
apiVersion: vlan.metal.equinix.com/v1alpha1
kind: VirtualNetwork
metadata:
name: xp-vlan
spec:
forProvider:
description: Example Crossplane provisioned VLAN
facility: sv15
providerRef:
name: equinix-metal-provider

0 comments on commit 43ae6da

Please sign in to comment.