Skip to content

Instantly share code, notes, and snippets.

View displague's full-sized avatar
🐝
Mergin' 🎶 on a Sunday afternoon 🎶

Marques Johansson displague

🐝
Mergin' 🎶 on a Sunday afternoon 🎶
View GitHub Profile
// crdsFromStack fetches the CRDs of the Stack using the shared parent labels
// TODO(displague) change this to use GET on each, the CRDs may not be ready
func (h *stackHandler) crdsFromStack(ctx context.Context) ([]apiextensions.CustomResourceDefinition, error) {
results := []apiextensions.CustomResourceDefinition{}
// TODO(displague) list CRDs by chained field selector, use apigroup+kind,
// not labels.
// Fetch CRDs because h.ext.Spec.CRDs doesn't have plural names
//labelSelector := client.MatchingLabels(map[string]string{

you can expect output.yaml from this gist, if in the branch crossplane/crossplane#1217, you:

  • remove this file: cluster/test/template-engine/helm2/stack.yaml
  • create behavior.yaml from this gist
  • run:
    go run cmd/crossplane/main.go stack unpack --content-dir=$GOPATH/src/github.com/crossplaneio/crossplane/cluster/test/template-engine/helm2  --permission-scope=Cluster
    
apiVersion: krew.googlecontainertools.github.com/v1alpha2
kind: Plugin
metadata:
name: crossplane
spec:
platforms:
- uri: https://github.com/crossplaneio/crossplane-cli/releases/download/v0.2.0/crossplane-cli_v0.2.0_linux_amd64.tar.gz
sha256: b086cc394ff8609a873e384b7848b70d2f973beb3191ec2e9d62a9ea8c153cba
bin: kubectl-crossplane-krew-wrapper
files:
diff --git a/design/one-pager-stacks-security-isolation.md b/design/one-pager-stacks-security-isolation.md
index 5700a46d..effe0164 100644
--- a/design/one-pager-stacks-security-isolation.md
+++ b/design/one-pager-stacks-security-isolation.md
@@ -342,15 +342,15 @@ The following built in roles will be installed and packaged with Crossplane, and
The verbs supported in these roles(admin,edit,view) will model behavior based on existing logic around
[built-in kubernetes roles](https://kubernetes.io/docs/reference/access-authn-authz/rbac/#default-roles-and-role-bindings).
-|ClusterRole Name | Permissions |
-|:---------------------|:----------|
apiVersion: stacks.crossplane.io/v1alpha1
kind: Stack
metadata:
creationTimestamp: null
spec:
company: Upbound
controller:
deployment:
name: crossplane-sample-extension
spec:
#!/usr/bin/env bash
set -e
scriptdir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
# shellcheck disable=SC1090
projectdir="${scriptdir}/../.."
# get the build environment variables from the special build.vars target in the main makefile
#!/bin/sh
days=${1:-1}
linode-cli profile token-create --expiry "$(TZ=UTC python3 -c 'import datetime; print((datetime.datetime.now().replace(microsecond=0) + datetime.timedelta(days='$days')).isoformat())')" --scopes="*" --format token --text --no-headers
kind: Pod
apiVersion: v1
metadata:
name: csi-example-pod
spec:
containers:
- name: csi-example-container
image: busybox
volumeMounts:
- mountPath: "/data1"
 terraform apply
An execution plan has been generated and is shown below.
Resource actions are indicated with the following symbols:
+ create
<= read (data resources)
Terraform will perform the following actions:
+ linode_instance.agent_public[0]
@displague
displague / linode-addons-secret.yaml
Last active January 25, 2019 20:30
Linode Kubernetes Add-ons Customized for RKE
apiVersion: v1
kind: Secret
metadata:
name: linode
namespace: kube-system
stringData:
token: ".... my secret token ...."
region: ".... us-central, us-east, eu-west, etc..."