Git Repository
The Git Repository component creates a Flux GitRepository resource. Check out the official GitRepository documentation for more information.
Example Usage
An example of a Git Repository for a GitHub repository is shown below.
When the provider is GitHub, a secretRef containing a GitHub token is required.
apiVersion: spectrocloud.com/v1beta1
kind: WorkloadProfile
metadata:
name: palette-docs
namespace: docs-ns
spec:
workload:
components:
- name: palette-docs
type: gitrepository
properties:
url: 'https://github.com/spectrocloud/librarium'
labels:
environment: production
app: librarium
team: docs
interval: '60m0s'
provider: 'github'
secretRef:
name: 'github-token'
ref:
branch: 'main'
---
apiVersion: v1
kind: Secret
metadata:
name: github-token
type: Opaque
data:
bearerToken: <BASE64 encoded GitHub token>
Parameters
Template
The following tabs display the definition's Cue template and the rendered YAML. The rendered YAML is the output of the Cue template when the definition is applied to a cluster.