1.2.2-0.1.0 • Published 5 years ago

@helm-charts/banzaicloud-stable-ark v1.2.2-0.1.0

Weekly downloads
1
License
MIT
Repository
-
Last release
5 years ago

@helm-charts/banzaicloud-stable-ark

A Helm chart for ark

FieldValue
Repository Namebanzaicloud-stable
Chart Nameark
Chart Version1.2.2
NPM Package Version0.1.0
image:
  repository: gcr.io/heptio-images/ark
  tag: v0.9.1
  pullPolicy: IfNotPresent

# A docker image with kubectl installed
kubectl:
  image:
    repository: claranet/gcloud-kubectl-docker
    tag: 1.0.0
    pullPolicy: IfNotPresent

# Only kube2iam: change the AWS_ACCOUNT_ID and HEPTIO_ARK_ROLE_NAME
podAnnotations: {}
#  iam.amazonaws.com/role: arn:aws:iam::<AWS_ACCOUNT_ID>:role/<HEPTIO_ARK_ROLE_NAME>

rbac:
  create: true

resources: {}

serviceAccount:
  hook:
    create: true
    name:
  server:
    create: true
    name:

tolerations: []

nodeSelector: {}

## Affinity
## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity
affinity: {}

## Parameters for the ' default' Config resource
## See https://heptio.github.io/ark/v0.9.0/config-definition
configuration:
  persistentVolumeProvider: {}
  #  name:
  #  config:
  #    region:
  #    apiTimeout:

  backupStorageProvider:
    name:
    bucket:
    config: {}
    #  region:
    #  s3ForcePathStyle:
    #  s3Url:
    #  kmsKeyId:

  backupSyncPeriod: 60m
  gcSyncPeriod: 60m
  scheduleSyncPeriod: 1m
  resourcePriorities: []
  restoreOnlyMode: false

credentials:
  existingSecret:
  useSecret: true
  secretContents: {}

Ark-server

This helm chart installs Ark version v0.9.0 https://github.com/heptio/ark/tree/v0.9.0

Premise

In general, Helm cannot install CRDs and resources based on these CRDs in the same Helm chart because CRDs need to be installed before CRD resources can be created and Helm cannot guarantee the correct ordering for this to work.

As a workaround, the chart creates a Config resource via post-install hook. Since resources created by hooks are not managed by Helm, a pre-delete hook removes the Config CRD when the release is deleted.

At the same time the resources created with the hook are completely transparent to Helm, that is, when you delete the chart those resources remain there. Hence we need a second hook for deleting them (see hook-delete.yaml)

ConfigMap customization

Since we want to have a customizable chart it's important that the configmap is a template and not a static file. To do this we add the keyword tpl when reading the file

  • {{ (tpl (.Files.Glob "configuration/").AsConfig .) | indent 2 }}

Prerequisites

Secret for cloud provider credentials

Ark server needs an IAM service account in order to run, if you don't have it you must create it. Please follow the official documentation: https://heptio.github.io/ark/v0.9.0/cloud-common

Don't forget the step to create the secret

kubectl create secret generic cloud-credentials --namespace <ARK_NAMESPACE> --from-file cloud=credentials-ark

Configuration

Please change the values.yaml according to your setup See here for the official documentation https://heptio.github.io/ark/v0.9.0/config-definition

ParameterDescriptionDefaultRequired
cloudproviderCloud providernilyes
bucketObject storage where to store backupsnilyes
regionAWS regionnilonly if using AWS
apitimeoutApi Timeoutnilonly if using Azure
credentialsCredentialsnilYes (not required for kube2iam)
backupSyncPeriodHow frequently Ark queries the object storage to make sure that the appropriate Backup resources have been created for existing backup files.60myes
gcSyncPeriodHow frequently Ark queries the object storage to delete backup files that have passed their TTL.60myes
scheduleSyncPeriodHow frequently Ark checks its Schedule resource objects to see if a backup needs to be initiated1myes
restoreOnlyModeWhen RestoreOnly mode is on, functionality for backups, schedules, and expired backup deletion is turned off. Restores are made from existing backup files in object storage.falseyes
kubectl.imageA docker image with kubectl, required by hook-deploy.yaml and hook-delete.yamldocker pull claranet/gcloud-kubectl-dockeryes
ParameterDescriptionDefault
image.repositoryImage repositorygcr.io/heptio-images/ark
image.tagImage tagv0.9.1
image.pullPolicyImage pull policyIfNotPresent
kubectl.image.repositoryImage repositoryclaranet/gcloud-kubectl-docker
kubectl.image.tagImage tag1.0.0
kubectl.image.pullPolicyImage pull policyIfNotPresent
podAnnotationsAnnotations for the Ark server pod{}
rbac.createIf true, create and use RBAC resourcestrue
rbac.server.serviceAccount.createWhether a new service account name that the server will use should be createdtrue
rbac.server.serviceAccount.nameService account to be used for the server. If not set and rbac.server.serviceAccount.create is true a name is generated using the fullname template
rbac.hook.serviceAccount.createWhether a new service account name that the hook will use should be createdtrue
rbac.hook.serviceAccount.nameService account to be used for the server. If not set and rbac.hook.serviceAccount.create is true a name is generated using the fullname template
resourcesResource requests and limits{}
tolerationsList of node taints to tolerate[]
nodeSelectorNode labels for pod assignment{}
affinityAffinity for pod assignment[]
configuration.persistentVolumeProvider.nameThe name of the cloud provider the cluster is using for persistent volumes, if any{}
configuration.persistentVolumeProvider.config.regionThe cloud provider region (AWS only)
configuration.persistentVolumeProvider.config.apiTimeoutThe API timeout (Azure only)
configuration.backupStorageProvider.namThe name of the cloud provider that will be used to actually store the backups (aws, azure, gcp)
configuration.backupStorageProvider.bucketThe storage bucket where backups are to be uploaded
configuration.backupStorageProvider.config.regionThe cloud provider region (AWS only)
configuration.backupStorageProvider.config.s3ForcePathStyleSet to true for a local storage service like Minio
configuration.backupStorageProvider.config.s3UrlS3 url (primarily used for local storage services like Minio)
configuration.backupStorageProvider.config.kmsKeyIdKMS key for encryption (AWS only)
configuration.backupSyncPeriodHow frequently Ark queries the object storage to make sure that the appropriate Backup resources have been created for existing backup files60m
configuration.gcSyncPeriodHow frequently Ark queries the object storage to delete backup files that have passed their TTL60m
configuration.scheduleSyncPeriodHow frequently Ark checks its Schedule resource objects to see if a backup needs to be initiated1m
configuration.resourcePrioritiesAn ordered list that describes the order in which Kubernetes resource objects should be restored[]
configuration.restoreOnlyModeWhen RestoreOnly mode is on, functionality for backups, schedules, and expired backup deletion is turned off. Restores are made from existing backup files in object storagefalse
credentials.existingSecretIf specified and useSecret is true, uses an existing secret with this name instead of creating one
credentials.useSecretWhether a secret should be used. Set this to false when using kube2iamtrue
credentials.secretContentsContents for the credentials secret{}

How to

helm install --name ark --namespace heptio-ark ./ark

Remove heptio/ark

Remember that when you remove Ark all backups remain untouched