Skip to content

Commit

Permalink
feat(ocean): new chart: ocean-operator
Browse files Browse the repository at this point in the history
  • Loading branch information
liranp committed Aug 15, 2021
1 parent 92f11ac commit d4c29ca
Show file tree
Hide file tree
Showing 14 changed files with 706 additions and 0 deletions.
23 changes: 23 additions & 0 deletions charts/ocean-operator/.helmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*.orig
*~
# Various IDEs
.project
.idea/
*.tmproj
.vscode/
17 changes: 17 additions & 0 deletions charts/ocean-operator/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
apiVersion: v2
name: ocean-operator
description: A Helm chart for Ocean Operator
type: application
version: 0.2.0
appVersion: 0.2.0
home: https://github.com/spotinst/charts/tree/main/charts/ocean-operator
icon: https://docs.spot.io/_media/images/spot_mark.png
sources:
- https://github.com/spotinst/ocean-operator
keywords:
- spot
- ocean
- operator
maintainers:
- name: spotinst
email: ng-spot-info@netapp.com
65 changes: 65 additions & 0 deletions charts/ocean-operator/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# ocean-operator

![Version: 0.2.0](https://img.shields.io/badge/Version-0.2.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.2.0](https://img.shields.io/badge/AppVersion-0.2.0-informational?style=flat-square)

A Helm chart for Ocean Operator. This chart is usually invoked by the [spotctl](https://github.com/spotinst/spotctl) tool, but may also be run manually.

## Installation

1. Add the Spot Helm chart repository:

```sh
helm repo add spot https://charts.spot.io
```

2. Update your local Helm chart repository cache:

```sh
helm repo update
```

3. Install `ocean-operator`:

```sh
helm install my-release spot/ocean-operator \
--set spotinst.token=REDACTED \
--set spotinst.account=REDACTED \
--set spotinst.clusterIdentifier=REDACTED \
# [...]
```

> NOTE: Please configure all required chart values using the `set` command line argument or a `values.yaml` file.
## Values

| Key | Type | Default | Description |
| -------------------------- | ------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| affinity.nodeAffinity | object | `{"preferredDuringSchedulingIgnoredDuringExecution":[{"preference":{"matchExpressions":[{"key":"spotinst.io/node-lifecycle","operator":"In","values":["od"]}]},"weight":1}]}` | (Optional) Node affinity. |
| bootstrap.components | list | `["ocean-controller","metrics-server"]` | (Optional) List of components to install during environment bootstrapping. |
| bootstrap.enabled | bool | `true` | (Optional) Enable environment bootstrapping. |
| bootstrap.namespace | string | `""` | (Optional) Namespace where components should be installed during environment bootstrapping. |
| extraArgs | list | `[]` | (Optional) Additional arguments. Ref: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container |
| fullnameOverride | string | `""` | (Optional) String to fully override `ocean-operator.fullname` template. |
| image.pullPolicy | string | `"IfNotPresent"` | (Optional) Image pull policy. |
| image.pullSecrets | list | `[]` | (Optional) Image pull secrets. |
| image.repository | string | `"gcr.io/spotinst-artifacts/ocean-operator"` | (Optional) Image repository. |
| image.tag | string | `""` | (Optional) Image tag. Defaults to `.Chart.AppVersion`. |
| nameOverride | string | `""` | (Optional) String to partially override `ocean-operator.fullname` template (will maintain the release name). |
| nodeSelector | object | `{}` | (Optional) Node selector. |
| podAnnotations | object | `{}` | (Optional) Pod annotations. Ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ |
| podSecurityContext | object | `{}` | (Optional) Pod security context. Ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-pod |
| replicaCount | int | `1` | (Optional) Replicas. Ref: https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#replicas |
| resources | object | `{"limits":{"cpu":"500m","memory":"500Mi"},"requests":{"cpu":"50m","memory":"50Mi"}}` | (Optional) Resource requests and limits. Ref: http://kubernetes.io/docs/user-guide/compute-resources/ |
| securityContext | object | `{}` | (Optional) Container security context. Ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-container |
| serviceAccount.annotations | object | `{}` | (Optional) Service account annotations. |
| serviceAccount.create | bool | `true` | (Optional) Controls whether a service account should be created. |
| serviceAccount.name | string | `"ocean-operator"` | (Optional) Service account name. |
| spotinst.account | string | `""` | (Required) Spot Account. Ref: https://docs.spot.io/administration/organizations?id=account |
| spotinst.acdIdentifier | string | `""` | (Optional) Unique identifier used by the Ocean AKS Connector when importing an AKS cluster. Ref: https://docs.spot.io/ocean/tutorials/connect-an-aks-private-cluster |
| spotinst.clusterIdentifier | string | `""` | (Required) Unique identifier used by the Ocean Controller to connect between the Ocean backend and the Kubernetes cluster. Ref: https://docs.spot.io/ocean/tutorials/spot-kubernetes-controller/ |
| spotinst.token | string | `""` | (Required) Spot Token. Ref: https://docs.spot.io/administration/api/create-api-token |
| tolerations | list | `[]` | (Optional) Tolerations for nodes that have taints on them. Ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ |

---

Autogenerated from chart metadata using [helm-docs v1.5.0](https://github.com/norwoodj/helm-docs/releases/v1.5.0)
39 changes: 39 additions & 0 deletions charts/ocean-operator/README.md.gotmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{{ template "chart.header" . }}

{{ template "chart.deprecationWarning" . }}

{{ template "chart.versionBadge" . }}{{ template "chart.typeBadge" . }}{{ template "chart.appVersionBadge" . }}

{{ template "chart.description" . }}. This chart is usually invoked by the [spotctl](https://github.com/spotinst/spotctl) tool, but may also be run manually.

## Installation

1. Add the Spot Helm chart repository:

```sh
helm repo add spot https://charts.spot.io
```

2. Update your local Helm chart repository cache:

```sh
helm repo update
```

3. Install `{{ template "chart.name" . }}`:

```sh
helm install my-release spot/{{ template "chart.name" . }} \
--set spotinst.token=REDACTED \
--set spotinst.account=REDACTED \
--set spotinst.clusterIdentifier=REDACTED \
# [...]
```

> NOTE: Please configure all required chart values using the `set` command line argument or a `values.yaml` file.

{{ template "chart.requirementsSection" . }}

{{ template "chart.valuesSection" . }}

{{ template "helm-docs.versionFooter" . }}
116 changes: 116 additions & 0 deletions charts/ocean-operator/crds/ocean.spot.io_oceancomponents.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.4.1
creationTimestamp: null
name: oceancomponents.ocean.spot.io
spec:
group: ocean.spot.io
names:
kind: OceanComponent
listKind: OceanComponentList
plural: oceancomponents
shortNames:
- oc
singular: oceancomponent
scope: Namespaced
versions:
- name: v1alpha1
schema:
openAPIV3Schema:
description: OceanComponent is the Schema for the OceanComponent API
properties:
apiVersion:
description: 'APIVersion defines the versioned schema of this representation
of an object. Servers should convert recognized schemas to the latest
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
type: string
kind:
description: 'Kind is a string value representing the REST resource this
object represents. Servers may infer this from the endpoint the client
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
type: string
metadata:
type: object
spec:
description: OceanComponentSpec defines the desired state of OceanComponent.
properties:
name:
description: Name is the name of the OceanComponent.
type: string
state:
description: State determines whether the component should be installed
or removed.
type: string
type:
description: Type is one of ["Helm"].
type: string
url:
description: URL is the location of the OceanComponent archive file.
type: string
values:
description: Values is the set of extra values added to the OceanComponent.
type: string
version:
description: Version is a SemVer 2 conformant version string of the
OceanComponent archive file.
type: string
required:
- name
- state
- type
- url
- version
type: object
status:
description: OceanComponentStatus defines the observed state of OceanComponent.
properties:
conditions:
items:
description: OceanComponentCondition describes the state of a deployment
at a certain point.
properties:
lastTransitionTime:
description: Last time the condition transitioned from one status
to another.
format: date-time
type: string
lastUpdateTime:
description: The last time this condition was updated.
format: date-time
type: string
message:
description: A human readable message indicating details about
the transition.
type: string
reason:
description: The reason for the condition's last transition.
type: string
status:
description: Status of the condition, one of True, False, Unknown.
type: string
type:
description: Type of deployment condition.
type: string
required:
- status
- type
type: object
type: array
properties:
additionalProperties:
type: string
description: A set of installation values specific to the component
type: object
type: object
type: object
served: true
storage: true
status:
acceptedNames:
kind: ""
plural: ""
conditions: []
storedVersions: []
Loading

0 comments on commit d4c29ca

Please sign in to comment.