Last modified October 2, 2020

kubectl gs template appcatalog

We assume that you have the alias kgs set up for the command kubectl gs.

In order to create an App Catalog using custom resources, kubectl-gs will help you create manifests for the resource type:

  • AppCatalog (API group/version application.giantswarm.io/v1alpha1) - holds the base AppCatalog specification.

Usage

The command to execute is kubectl gs template appcatalog.

It supports the following flags:

  • --name - Catalog name.
  • --description - Description of the purpose of the catalog.
  • --url - URL where the helm repository lives.
  • --owner - organization, owning tenant cluster. Must be configured with existing organization in installation.
  • --logo - URL of the catalog logo image.

Example command:

kubectl gs template template appcatalog \
  --name example-catalog \
  --description "An example App Catalog" \
  --url https://example.github.io/my-app-catalog/ \
  --logo https://example.com/logos/example-logo.png

Output

As a result, the command will produce a YAML document comprising three parts:

  • a ConfigMap
  • a Secret
  • the AppCatalog resource

The following example illustrates the output generated:

apiVersion: v1
data:
  values: ""
kind: ConfigMap
metadata:
  creationTimestamp: null
  name: example-catalog558rf
  namespace: default
---
apiVersion: v1
kind: Secret
metadata:
  creationTimestamp: null
  name: example-catalog558rf
  namespace: default
---
apiVersion: application.giantswarm.io/v1alpha1
kind: AppCatalog
metadata:
  creationTimestamp: null
  labels:
    app-operator.giantswarm.io/version: 1.0.0
    application.giantswarm.io/catalog-type: awesome
  name: example-catalog
spec:
  config:
    configMap:
      name: example-catalog558rf
      namespace: default
    secret:
      name: example-catalog558rf
      namespace: default
  description: An example App Catalog
  logoURL: https://example.com/logos/example-logo.png
  storage:
    URL: https://example.github.io/my-app-catalog/
    type: helm
  title: example-catalog