FluxCD

    If you only want to deploy the helm application with fluxcd addon, you can execute the following command to enable only helm related components.

    The following definitions will be enabled after the installation of fluxcd addon.

    Parameters

    ParametersDescriptionExample
    repoTyperequired, indicates the type of repository, should be “helm”,”git”, “oss”, or “oci”.Helm
    pullIntervaloptional, the interval at which to check for repository/bucket and release updates, default to 5m5m
    urlrequired, the Git or Helm repository URL, OSS endpoint, accept HTTP/S or SSH address as git urlhttps://charts.bitnami.com/bitnami
    secretRefoptional, the name of the Secret object that holds the credentials required to pull the repo. The username and password fields must be included in the HTTP/S basic authentication Secret. For TLS the secret must contain a certFile and keyFile, and/or caCert fields. For TLS authentication, the secret must contain a certFile / keyFile field and/or caCert field.sec-name
    timeoutoptional, the timeout for operations like download index/clone repository60s
    chartrequired, the relative path to helm chart for git/oss source. The chart name for helm resourceredis-cluster
    versionoptional, chart version, * by default6.2.7
    targetNamespaceoptional, the namespace to install chart, decided by chart itselfyour-ns
    releaseNameoptional, release name after installedyour-rn
    valuesoptional, override the Values.yaml inchart, using for the rendering of Helm
    installTimeoutoptional, the timeout for operation helm install, and 10 minutes by default20m
    intervaloptional, the Interval at which to reconcile the Helm release, default to 30s1m
    ossoptional, The source configuration
    gitoptional, The git source configurationdev
    OSS
    Git
    ParametersDescriptionExample
    branchoptional, Git branch, master by defaultyour-branch

    Example

    You can create an application like below to deploy a helm chart which stored in helm repository.

    1. apiVersion: core.oam.dev/v1beta1
    2. kind: Application
    3. metadata:
    4. name: helm-redis
    5. spec:
    6. components:
    7. - name: redis
    8. type: helm
    9. properties:
    10. repoType: "helm"
    11. url: "https://charts.bitnami.com/bitnami"
    12. chart: "redis"
    13. version: "16.8.5"
    14. values:
    15. master:
    16. persistence:
    17. size: 16Gi
    18. replica:
    19. persistence:
    20. size: 16Gi

    If your helm chart is stored in OCI registry, you can create the application like this:

    If your helm chart is stored in OSS, you can create the application like this:

    1. apiVersion: core.oam.dev/v1beta1
    2. kind: Application
    3. name: bucket-app
    4. spec:
    5. components:
    6. type: helm
    7. properties:
    8. repoType: oss
    9. # required if bucket is private
    10. secretRef: bucket-secret
    11. chart: ./chart/podinfo-5.1.3.tgz
    12. url: oss-cn-beijing.aliyuncs.com
    13. oss:
    14. bucketName: definition-registry

    If your helm chart stored in git, you can create the application like this:

    1. apiVersion: core.oam.dev/v1beta1
    2. kind: Application
    3. metadata:
    4. name: app-delivering-chart
    5. spec:
    6. components:
    7. - name: terraform-controller
    8. type: helm
    9. properties:
    10. repoType: git
    11. url: https://github.com/oam-dev/terraform-controller
    12. chart: ./chart
    13. git:
    14. branch: master

    kustomize

    Parameters

    Image Repository
    ParameterRequiredDescriptionExample
    imagerequiredThe image urloamdev/vela-core
    secretRefoptionalIf it’s a private image registry, use kubectl create secret docker-registry to create the secretmy-secret
    policyoptional gives the particulars of the policy to be followed in selecting the most recent image.
    filterTagsoptionalFilterTags enables filtering for only a subset of tags based on a set of rules. If no rules are provided, all the tags from the repository will be ordered and compared.$timestamp
    commitMessageoptionalUse for more commit message
    Image policy
    FilterTags
    ParameterRequiredDescriptionExample
    extractoptionalExtract allows a capture group to be extracted from the specified regular expression pattern, useful before tag evaluation$timestamp
    patternoptionalPattern specifies a regular expression pattern used to filter for image tags‘^master-[a-f0-9]’

    Example

    1. If your kustomize style artifact is stored in oss, you can create application by flowing these steps:

    (Optional)If your OSS bucket needs identity verification, create a Secret first:

    Deploy this application:

    1. apiVersion: core.oam.dev/v1beta1
    2. kind: Application
    3. metadata:
    4. spec:
    5. components:
    6. - name: bucket-comp
    7. type: kustomize
    8. properties:
    9. # If the bucket is private, you will need to provide
    10. secretRef: bucket-secret
    11. url: oss-cn-beijing.aliyuncs.com
    12. oss:
    13. bucketName: definition-registry
    14. path: ./app/prod/
    1. If your artifact is stored in git, you can create application like this:
    1. apiVersion: core.oam.dev/v1beta1
    2. kind: Application
    3. metadata:
    4. name: git-app
    5. spec:
    6. components:
    7. - name: git-comp
    8. type: kustomize
    9. properties:
    10. repoType: git
    11. url: https://github.com/<path>/<to>/<repo>
    12. git:
    13. branch: master
    14. provider: GitHub
    15. path: ./app/dev/
    1. If you want to create a application which updated automatically when image updated. You can create the application like this.
    • Source controller

      • The source-controller is a Kubernetes operator, specialised in artifacts acquisition from external sources such as Git, Helm repositories and S3 buckets. The source-controller implements the source.toolkit.fluxcd.io API and is a core component of the GitOps toolkit.
    • Image (metadata) reflector controller

      • This is a controller that reflects container image metadata into a Kubernetes cluster. It pairs with the image update automation controller to drive automated config updates.
    • Image automation controller

      • This controller automates updates to YAML when new container images are available.
      • Its sibling, image-reflector-controller, scans container image repositories and reflects the metadata in Kubernetes resources. This controller reacts to that image metadata by updating YAML files in a git repository, and committing the changes.
    • kustomize-controller

      • The kustomize-controller is a Kubernetes operator, specialized in running continuous delivery pipelines for infrastructure and workloads defined with Kubernetes manifests and assembled with Kustomize.
      • overview
      • The helm-controller is a Kubernetes operator, allowing one to declaratively manage Helm chart releases. It is part of a composable GitOps toolkit and depends on source-controller to acquire the Helm charts from Helm repositories.
      • The desired state of a Helm release is described through a Kubernetes Custom Resource named HelmRelease. Based on the creation, mutation or removal of a HelmRelease resource in the cluster, Helm actions are performed by the operator.