Skip to content

Commit

Permalink
Add Kubernetes template
Browse files Browse the repository at this point in the history
  • Loading branch information
AjBreidenbach committed Oct 12, 2023
1 parent 69cf777 commit d1cd515
Showing 1 changed file with 60 additions and 0 deletions.
60 changes: 60 additions & 0 deletions unfurl/templates/k8s/unfurl.yaml.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
#jinja2: variable_start_string: '[%', variable_end_string: '%]'
apiVersion: unfurl/v1alpha1
kind: Project
[%include | default("") %]
{%- if default_context | default("") %}
default_environment: [%default_context%]
{% endif %}

environments:
[% default_context | default("defaults") %]:
imports:
- file: tosca_plugins/k8s.yaml
repository: unfurl

connections:
# declare the primary_provider as a connection to a Kubernetes cluster:
primary_provider:
type: unfurl.relationships.ConnectsTo.K8sCluster
# properties:
# name:
# Defaults to envvar: KUBE_CTX_CLUSTER

# KUBECONFIG:
# Path to an existing Kubernetes config file. If not provided, and no other connection
# options are provided, and the KUBECONFIG environment variable is not set, the default location will be used (~/.kube/config.json).
# Defaults to envvar: KUBECONFIG

# context:
# The name of a context found in the config file. If not set the current-context will be used.
# Defaults to envvar: KUBE_CTX

# cluster_ca_certificate:
# Defaults to envvar: KUBE_CLUSTER_CA_CERT_DATA

# insecure:
# If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure
# Defaults to envvar: KUBE_INSECURE

# token:
# Defaults to envvar: KUBE_TOKEN

# credential:
# token_type is either "api_key" or "password" (default is "password")
# Its "keys" map can have the following values:
# "cert_file": Path to a cert file for the certificate authority
# "ca_cert": Path to a client certificate file for TLS
# "key_file": Path to a client key file for TLS

# namespace:
# The default namespace scope to use

# api_server:
# The address and port of the Kubernetes API server
# Defaults to envvar: KUBE_HOST

# protocol: https

# Alternatively, if you have already declared the connection in UNFURL_HOME you can rename the existing connection by
# setting "primary_provider" to the name of the inherited connection, for example:
# primary_provider: k8s

0 comments on commit d1cd515

Please sign in to comment.