Skip to content

Latest commit

 

History

History
147 lines (116 loc) · 4.64 KB

config-definition.md

File metadata and controls

147 lines (116 loc) · 4.64 KB

Ark Config definition and Ark server deployment

Config

Heptio Ark defines its own Config object (a custom resource) for specifying Ark backup and cloud provider settings. When the Ark server is first deployed, it waits until you create a Config --specifically one named default-- in the heptio-ark namespace.

NOTE: There is an underlying assumption that you're running the Ark server as a Kubernetes deployment. If the default Config is modified, the server shuts down gracefully. Once the kubelet restarts the Ark server pod, the server then uses the updated Config values.

Example

A sample YAML Config looks like the following:

apiVersion: ark.heptio.com/v1
kind: Config
metadata:
  namespace: heptio-ark
  name: default
persistentVolumeProvider:
  name: aws
  config:
    region: us-west-2

Parameter Reference

The configurable parameters are as follows:

Main config parameters

Key Type Default Meaning
persistentVolumeProvider CloudProviderConfig None (Optional) The specification for whichever cloud provider the cluster is using for persistent volumes (to be snapshotted), if any.

If not specified, Backups and Restores requesting PV snapshots & restores, respectively, are considered invalid.

NOTE: For Azure, your Kubernetes cluster needs to be version 1.7.2+ in order to support PV snapshotting of its managed disks.
persistentVolumeProvider/name String

(Ark natively supports aws, gcp, and azure. Other providers may be available via external plugins.)
None (Optional) The name of the cloud provider the cluster is using for persistent volumes, if any.
persistentVolumeProvider/config map[string]string

(See the corresponding AWS, GCP, and Azure-specific configs or your provider's documentation.)
None (Optional) Configuration keys/values to be passed to the cloud provider for persistent volumes.

AWS

persistentVolumeProvider/config (AWS Only)
Key Type Default Meaning
region string Required Field Example: "us-east-1"

See AWS documentation for the full list.

Azure

persistentVolumeProvider/config
Key Type Default Meaning
apiTimeout metav1.Duration 2m0s How long to wait for an Azure API request to complete before timeout.

GCP

persistentVolumeProvider/config

No parameters required.

Deployment

Heptio Ark also defines its own Deployment object for starting the Ark server on Kubernetes. When the Ark server is deployed, there are specific configurations that might be changed.

Sample Deployment

A sample YAML Deployment looks like the following:

apiVersion: apps/v1beta1
kind: Deployment
metadata:
  namespace: heptio-ark
  name: ark
spec:
  replicas: 1
  template:
    metadata:
      labels:
        component: ark
      annotations:
        prometheus.io/scrape: "true"
        prometheus.io/port: "8085"
        prometheus.io/path: "/metrics"
    spec:
      restartPolicy: Always
      serviceAccountName: ark
      containers:
        - name: ark
          image: gcr.io/heptio-images/ark:latest
          command:
            - /ark
          args:
            - server
            - --backup-sync-period
            - 30m
          volumeMounts:
            - name: cloud-credentials
              mountPath: /credentials
            - name: plugins
              mountPath: /plugins
            - name: scratch
              mountPath: /scratch
          env:
            - name: AWS_SHARED_CREDENTIALS_FILE
              value: /credentials/cloud
            - name: ARK_SCRATCH_DIR
              value: /scratch
      volumes:
        - name: cloud-credentials
          secret:
            secretName: cloud-credentials
        - name: plugins
          emptyDir: {}
        - name: scratch
          emptyDir: {}

Parameter Options

The list of configurable options for the ark server deployment can be found on the CLI reference document.