Skip to content

Commit

Permalink
Merge pull request #100 from kanisterio/sync
Browse files Browse the repository at this point in the history
 Add README to helm chart for kanister Profiles
  • Loading branch information
Vaibhav Kamra authored Jun 21, 2018
2 parents 7eb1436 + 6f988f2 commit 6cf4226
Show file tree
Hide file tree
Showing 3 changed files with 75 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docs/helm_instructions/pgsql_instructions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ your installation.
# Install Kanister-enabled PostgreSQL
$ helm install kanister/kanister-postgresql -n postgresql \
--namespace postgresql-test \
--namespace postgresql-test
.. note:: The above command will attempt to use dynamic storage provisioning
based on the the default storage class for your cluster. You will to need to
Expand Down
4 changes: 2 additions & 2 deletions examples/helm/kanister/kanister-postgresql/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Prior to install you will need to have the Kanister Helm repository added to you
$ helm repo add kanister http://charts.kanister.io
```

Then install the sample Postrges application in its own namespace.
Then install the sample Postgres application in its own namespace.

```bash
$ helm install kanister/kanister-postgresql -n my-release --namespace postgres-test \
Expand Down Expand Up @@ -83,7 +83,7 @@ default values. The Profile CR parameters are passed to the profile sub-chart.
| Parameter | Description | Default |
| --- | --- | --- |
| `profile.create` | (Optional) Specify if a Profile CR should be created as part of install. | ``false`` |
| `profile.defaultProfile` | (Optional if not creating a default Profile) Set to ``true`` to create a profile with name `default-profile` | ``false`` |
| `profile.defaultProfile` | (Optional) Set to ``true`` to create a profile with name `default-profile` | ``false`` |
| `profile.profileName` | (Required if not creating a default Profile) Name for the profile that is created | `nil` |
| `profile.s3.accessKey` | (Required if creating profile) API Key for an s3 compatible object store. | `nil`|
| `profile.s3.secretKey` | (Required if creating profile) Corresponding secret for `accessKey`. | `nil` |
Expand Down
72 changes: 72 additions & 0 deletions helm/profile/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
# Profile CustomResource

Profile CustomResources (CRs) are used to provide configuration information to
[Kanister](https://kansiter.io), a framework that enables application-level data
management on Kubernetes.

## TL;DR;

```bash
# Add the Kanister helm repo
$ helm repo add kanister https://charts.kanister.io/

# Create a Profile with the default name in the kanister namespace
$ helm install kanister/profile --namespace kanister \
--set defaultProfile=true \
--set s3.accessKey="${AWS_ACCESS_KEY}" \
--set s3.secretKey="${AWS_SECRET_KEY}" \
--set s3.bucket='my-kanister-bucket'
```

## Overview

This chart installs a Profile CR for [Kanister](http://kanister.io) using the
[Helm](https://helm.sh) package manager.

Profiles provide strongly-typed configuration for Kanister. Because a Profile
is structured, the Kanister framework is able to provide support for advanced
features. Rather than relying on one-off implementations in Blueprints that
consume ConfigMaps Kanister introspect and use configuration from Profiles.

The schema for Profiles is specified by the CustomResourceDefinition (CRD),
which can be found [here](https://github.com/kanisterio/kanister/blob/master/pkg/apis/cr/v1alpha1/types.go#L234).

Currently Profiles can be used to configure access to object storage compatible
with the [S3 protocol](https://docs.aws.amazon.com/AmazonS3/latest/API/Welcome.html).

## Prerequisites

- Kubernetes 1.7+ with Beta APIs enabled or 1.9+ without Beta APIs.
- Kanister version 0.8.0 with `profiles.cr.kanister.io` CRD installed

> **Note**: The Kanister controller will create the Profile CRD at Startup.
## Configuration

The following table lists the configurable PostgreSQL Kanister blueprint and
Profile CR parameters and their default values. The Profile CR parameters are
passed to the profile sub-chart.

| Parameter | Description | Default |
| --- | --- | --- |
| `defaultProfile` | (Optional) Set to ``true`` to create a profile with name `default-profile`. | ``false`` |
| `profileName` | (Required if `! defaultProfile`) Name of the Profile CR. | `nil` |
| `s3.accessKey` | (Required) API Key for an s3 compatible object store. | `nil` |
| `s3.secretKey` | (Required) Corresponding secret for `accessKey`. | `nil` |
| `s3.bucket` | (Required) Bucket used to store Kanister artifacts.<br><br>The bucket must already exist. | `nil` |
| `s3.region` | (Optional) Region to be used for the bucket. | `nil` |
| `s3.endpoint` | (Optional) The URL for an s3 compatible object store provider. Can be omitted if provider is AWS. Required for any other provider. | `nil` |
| `verifySSL` | (Optional) Set to ``false`` to disable SSL verification on the s3 endpoint. | `true` |

Specify each parameter using the `--set key=value[,key=value]` argument to `helm
install`. For example:

```bash
$ helm install kanister/profile my-profile-release --namespace kanister \
--set profileName='my-profile' \
--set s3.endpoint='https://my-custom-s3-provider:9000' \
--set s3.accessKey="${AWS_ACCESS_KEY}" \
--set s3.secretKey="${AWS_SECRET_KEY}" \
--set s3.bucket='my-kanister-bucket'
--set s3.verifySSL='true'
```

0 comments on commit 6cf4226

Please sign in to comment.