stakater-create-environment
by stakater
Helm chartv1.0.7App 1.0.0Verified publisher
A Helm chart for create environment cluster task
About this chart
create environment
Create testing environments for pull requests via tronador environment custom resource.
tests
-
Clone the task folder and run helm template . inside the chart directory.
-
Copy the generated yaml and change the kind from ClusterTask to Task
-
Create a pipeline that contains git-clone and create environment task.
apiVersion: tekton.dev/v1beta1
kind: Pipeline
metadata:
name: p-create-environment
namespace: gabbar-build
spec:
tasks:
- name: git-clone
params:
- name: url
value: "https://github.com/stakater-lab/stakater-nordmart-review"
- name: revision
value: "a65fd7308c1b1a1a9f284773ba0d0e934d93f1d5"
- name: depth
value: '0'
taskRef:
kind: ClusterTask
name: git-clone
workspaces:
- name: output
workspace: source
- name: create-env
params:
- name: CREATE_ON_CLUSTER
value: 'true'
- name: REPO_NAME
value: 'stakater-nordmart-review'
- name: PR_NUMBER
value: '353'
- name: GIT_URL
value: 'https://github.com/stakater-lab/stakater-nordmart-review'
- name: GIT_BRANCH
value: 'AsfaMumtaz-patch-1'
- name: IMAGE_TAG
value: 'snapshot-pr-353-a65fd730'
- name: IMAGE_REPO
value: >-
'nexus-docker-stakater-nexus.apps.devtest.vxdqgl7u.kubeapp.cloud/stakater-nordmart-review'
- name: 'PULL_REQUEST_COMMITS_API'
value: 'https://api.github.com/repos/stakater-lab/stakater-nordmart-review/pulls/353/commits'
runAfter:
- git-clone
taskRef:
kind: Task
name: stakater-create-environment-1.0.0-testing
workspaces:
- name: output
workspace: source
workspaces:
- name: source
---
apiVersion: tekton.dev/v1beta1
kind: PipelineRun
metadata:
name: pr-create-environment
namespace: gabbar-build
spec:
pipelineRef:
name: p-create-environment
serviceAccountName: stakater-tekton-builder
workspaces:
- name: source
volumeClaimTemplate:
metadata:
creationTimestamp: null
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
- Verify if the task runs successfully.
Deploy stakater-create-environment with OpenTenant
Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has stakater-create-environment on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.
- Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
- Place the chartstakater-create-environment is pinned at v1.0.7 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
- ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below opentenant validate opentenant.yaml terraform init && terraform apply