The Accelerator custom resource definition (CRD) defines any accelerator resources that should be made available to the Application Accelerator for VMware Tanzu system. It is a namespaced CRD, meaning that any resources created will belong to a namespace and in order for the resource to be available to the Application Accelerator system it must be created in the namespace that the Application Acccelerator UI Server is configured to watch.

API definitions

The Accelerator CRD is defined with the following properties:

Property Value
Name Accelerator
Group accelerator.apps.tanzu.vmware.com
Version v1alpha1
ShortName acc

The Accelerator CRD spec defined in the AcceleratorSpec type has the following fields:

Field Description Required/Optional
displayName A short descriptive name used for an Accelerator. Optional (*)
description A longer description of an Accelerator. Optional (*)
iconUrl A URL for an image to represent the Accelerator in a UI. Optional (*)
tags An array of strings defining attributes of the Accelerator that can be used in a search. Optional (*)
git Defines the accelerator source Git repository. Required
git.url The repository URL, can be a HTTP/S or SSH address. Required
git.ignore Overrides the set of excluded patterns in the .sourceignore format (which is the same as .gitignore). If not provided, a default of .git/ will be used. Optional (**)
git.interval The interval at which to check for repository updates. If not provided it defaults to 10 min. Optional (**)
git.ref Git reference to checkout and monitor for changes, defaults to master branch. Optional (**)
git.ref.branch The Git branch to checkout, defaults to master. Optional (**)
git.ref.commit The Git commit SHA to checkout, if specified tag filters will be ignored. Optional (**)
git.ref.semver The Git tag semver expression, takes precedence over tag. Optional (**)
git.ref.tag The Git tag to checkout, takes precedence over branch. Optional (**)
git.secretRef The secret name containing the Git credentials. For HTTPS repositories the secret must contain username and password fields. For SSH repositories the secret must contain identity, identity.pub and known_hosts fields. Optional (**)

* Any optional fields marked with an asterisk (*) will be populated from a field of the same name in the accelerator definition in the accelerator.yaml file if that is present in the Git repository for the accelerator.

** Any fields marked with a double asterisk (**) are part of the Flux GitRepository CRD that is documented in the Flux Source Controller Git Repositories documentation.

Excluding files

The git.ignore field defaults to .git/ which is different from the defaults provided by the Flux Source Controller GitRepository implementation. You can override this, and provide your own exclusions. See the fluxcd/source-controller Excluding files documentation for additional details.

Non-public repositories

For Git repositories that aren't accessible anonymously we need to provide credentials in a Secret. For HTTPS repositories the secret must contain username and password fields. For SSH repositories the secret must contain identity, identity.pub and known_hosts fields. See the fluxcd/source-controller HTTPS authentication and fluxcd/source-controller SSH authentication documentation for additional details.

Examples

A minimal example could look like the following manifest:

hello-fun.yaml

apiVersion: accelerator.apps.tanzu.vmware.com/v1alpha1
kind: Accelerator
metadata:
  name: hello-fun
spec:
  git:
    url: https://github.com/sample-accelerators/hello-fun
    ref:
      branch: main

This minimal example creates an accelerator named hello-fun. The displayName, description, iconUrl, and tags fields will be populated based on the content under the accelerator key in the accelerator.yaml file that is found in the main branch of the Git repo at https://github.com/sample-accelerators/hello-fun. That file could have this content:

accelerator.yaml

accelerator:
  displayName: Hello Fun
  description: A simple Spring Cloud Function serverless app
  iconUrl: https://raw.githubusercontent.com/simple-starters/icons/master/icon-cloud.png
  tags:
  - java
  - spring
  - cloud
  - function
  - serverless

...

We can also explicitly specify the displayName, description, iconUrl, and tags fields and this would override any values provided in the accelerator's Git repository. The following example explicitly sets thos fields plus the ignore field as well:

my-hello-fun.yaml

apiVersion: accelerator.apps.tanzu.vmware.com/v1alpha1
kind: Accelerator
metadata:
  name: my-hello-fun
spec:
  displayName: My Hello Fun
  description: My own Spring Cloud Function serverless app
  iconUrl: https://github.com/simple-starters/icons/raw/master/icon-cloud.png
  tags:
    - spring
    - cloud
    - function
    - serverless
  git:
    ignore: ".git/, bin/"
    url: https://github.com/sample-accelerators/hello-fun
    ref:
      branch: test
check-circle-line exclamation-circle-line close-line
Scroll to top icon