From d4c29ca11194b92fbd3e5c443bce67da3b6145c4 Mon Sep 17 00:00:00 2001 From: liranp Date: Thu, 12 Aug 2021 12:32:49 +0300 Subject: [PATCH] feat(ocean): new chart: `ocean-operator` --- charts/ocean-operator/.helmignore | 23 ++++ charts/ocean-operator/Chart.yaml | 17 +++ charts/ocean-operator/README.md | 65 ++++++++++ charts/ocean-operator/README.md.gotmpl | 39 ++++++ .../crds/ocean.spot.io_oceancomponents.yaml | 116 ++++++++++++++++++ charts/ocean-operator/templates/_helpers.tpl | 66 ++++++++++ .../ocean-operator/templates/config_map.yaml | 17 +++ .../ocean-operator/templates/deployment.yaml | 95 ++++++++++++++ charts/ocean-operator/templates/role.yaml | 88 +++++++++++++ .../templates/role_binding.yaml | 26 ++++ charts/ocean-operator/templates/secret.yaml | 14 +++ charts/ocean-operator/templates/service.yaml | 16 +++ .../templates/service_account.yaml | 12 ++ charts/ocean-operator/values.yaml | 112 +++++++++++++++++ 14 files changed, 706 insertions(+) create mode 100644 charts/ocean-operator/.helmignore create mode 100644 charts/ocean-operator/Chart.yaml create mode 100644 charts/ocean-operator/README.md create mode 100644 charts/ocean-operator/README.md.gotmpl create mode 100644 charts/ocean-operator/crds/ocean.spot.io_oceancomponents.yaml create mode 100644 charts/ocean-operator/templates/_helpers.tpl create mode 100644 charts/ocean-operator/templates/config_map.yaml create mode 100644 charts/ocean-operator/templates/deployment.yaml create mode 100644 charts/ocean-operator/templates/role.yaml create mode 100644 charts/ocean-operator/templates/role_binding.yaml create mode 100644 charts/ocean-operator/templates/secret.yaml create mode 100644 charts/ocean-operator/templates/service.yaml create mode 100644 charts/ocean-operator/templates/service_account.yaml create mode 100644 charts/ocean-operator/values.yaml diff --git a/charts/ocean-operator/.helmignore b/charts/ocean-operator/.helmignore new file mode 100644 index 0000000..0e8a0eb --- /dev/null +++ b/charts/ocean-operator/.helmignore @@ -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/ diff --git a/charts/ocean-operator/Chart.yaml b/charts/ocean-operator/Chart.yaml new file mode 100644 index 0000000..a671bcb --- /dev/null +++ b/charts/ocean-operator/Chart.yaml @@ -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 diff --git a/charts/ocean-operator/README.md b/charts/ocean-operator/README.md new file mode 100644 index 0000000..76b1bfe --- /dev/null +++ b/charts/ocean-operator/README.md @@ -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) diff --git a/charts/ocean-operator/README.md.gotmpl b/charts/ocean-operator/README.md.gotmpl new file mode 100644 index 0000000..bc81344 --- /dev/null +++ b/charts/ocean-operator/README.md.gotmpl @@ -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" . }} diff --git a/charts/ocean-operator/crds/ocean.spot.io_oceancomponents.yaml b/charts/ocean-operator/crds/ocean.spot.io_oceancomponents.yaml new file mode 100644 index 0000000..a2bb5d5 --- /dev/null +++ b/charts/ocean-operator/crds/ocean.spot.io_oceancomponents.yaml @@ -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: [] diff --git a/charts/ocean-operator/templates/_helpers.tpl b/charts/ocean-operator/templates/_helpers.tpl new file mode 100644 index 0000000..4cf3b45 --- /dev/null +++ b/charts/ocean-operator/templates/_helpers.tpl @@ -0,0 +1,66 @@ +{{/* vim: set filetype=mustache: */}} + +{{/* +{{/* +Expand the name of the chart. +*/}} +{{- define "ocean-operator.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to +this (by the DNS naming spec). If release name contains chart name it will be +used as a full name. +*/}} +{{- define "ocean-operator.fullname" -}} +{{- if .Values.fullnameOverride }} +{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} +{{- else }} +{{- $name := default .Chart.Name .Values.nameOverride }} +{{- if contains $name .Release.Name }} +{{- .Release.Name | trunc 63 | trimSuffix "-" }} +{{- else }} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} +{{- end }} +{{- end }} +{{- end }} + +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define "ocean-operator.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{/* +Common labels +*/}} +{{- define "ocean-operator.labels" -}} +helm.sh/chart: {{ include "ocean-operator.chart" . }} +{{ include "ocean-operator.selectorLabels" . }} +{{- if .Chart.AppVersion }} +app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} +{{- end }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +{{- end }} + +{{/* +Selector labels +*/}} +{{- define "ocean-operator.selectorLabels" -}} +app.kubernetes.io/name: {{ include "ocean-operator.name" . }} +app.kubernetes.io/instance: {{ .Release.Name }} +{{- end }} + +{{/* +Create the name of the service account to use +*/}} +{{- define "ocean-operator.serviceAccountName" -}} +{{- if .Values.serviceAccount.create }} +{{- default (include "ocean-operator.fullname" .) .Values.serviceAccount.name }} +{{- else }} +{{- default "default" .Values.serviceAccount.name }} +{{- end }} +{{- end }} diff --git a/charts/ocean-operator/templates/config_map.yaml b/charts/ocean-operator/templates/config_map.yaml new file mode 100644 index 0000000..d2c41dd --- /dev/null +++ b/charts/ocean-operator/templates/config_map.yaml @@ -0,0 +1,17 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ include "ocean-operator.fullname" . }} + labels: + {{- include "ocean-operator.labels" . | nindent 4 }} + {{- with .Values.serviceAccount.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +data: + {{- with .Values.spotinst }} + clusterIdentifier: {{ required "spotinst.clusterIdentifier is missing" .clusterIdentifier }} + {{- if .acdIdentifier }} + acdIdentifier: {{ .acdIdentifier }} + {{- end }} + {{- end }} diff --git a/charts/ocean-operator/templates/deployment.yaml b/charts/ocean-operator/templates/deployment.yaml new file mode 100644 index 0000000..d42ae1f --- /dev/null +++ b/charts/ocean-operator/templates/deployment.yaml @@ -0,0 +1,95 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ include "ocean-operator.fullname" . }} + labels: + {{- include "ocean-operator.labels" . | nindent 4 }} +spec: + replicas: {{ .Values.replicaCount }} + selector: + matchLabels: + {{- include "ocean-operator.selectorLabels" . | nindent 6 }} + template: + metadata: + {{- with .Values.podAnnotations }} + annotations: + {{- toYaml . | nindent 8 }} + {{- end }} + labels: + {{- include "ocean-operator.selectorLabels" . | nindent 8 }} + spec: + {{- with .Values.image.pullSecrets }} + imagePullSecrets: + {{- toYaml . | nindent 8 }} + {{- end }} + serviceAccountName: {{ include "ocean-operator.serviceAccountName" . }} + {{- if .Values.podSecurityContext }} + securityContext: + {{- toYaml .Values.podSecurityContext | nindent 8 }} + {{- end }} + containers: + - name: manager + args: + - manager + - --leader-elect + {{- with .Values.bootstrap }} + {{- if .enabled }} + - --bootstrap-namespace={{ .namespace | default $.Release.Namespace }} + {{- with .components }} + - --bootstrap-components={{- join "," . }} + {{- end }} + {{- end }} + {{- end }} + {{- range .Values.extraArgs }} + {{- if hasPrefix "--" . }} + - {{ . }} + {{- else }} + - --{{ . }} + {{- end }} + {{- end }} + ports: + - name: metrics + containerPort: 8080 + protocol: TCP + env: + - name: SPOTINST_TOKEN + valueFrom: + secretKeyRef: + name: {{ include "ocean-operator.fullname" . }} + key: token + - name: SPOTINST_ACCOUNT + valueFrom: + secretKeyRef: + name: {{ include "ocean-operator.fullname" . }} + key: account + - name: SPOTINST_CLUSTER_IDENTIFIER + valueFrom: + configMapKeyRef: + name: {{ include "ocean-operator.fullname" . }} + key: clusterIdentifier + - name: SPOTINST_ACD_IDENTIFIER + valueFrom: + configMapKeyRef: + name: {{ include "ocean-operator.fullname" . }} + key: acdIdentifier + optional: true + {{- if .Values.securityContext }} + securityContext: + {{- toYaml .Values.securityContext | nindent 12 }} + {{- end }} + image: {{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }} + imagePullPolicy: {{ .Values.image.pullPolicy }} + resources: + {{- toYaml .Values.resources | nindent 12 }} + {{- with .Values.nodeSelector }} + nodeSelector: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.affinity }} + affinity: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.tolerations }} + tolerations: + {{- toYaml . | nindent 8 }} + {{- end }} diff --git a/charts/ocean-operator/templates/role.yaml b/charts/ocean-operator/templates/role.yaml new file mode 100644 index 0000000..3e66d73 --- /dev/null +++ b/charts/ocean-operator/templates/role.yaml @@ -0,0 +1,88 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: {{ include "ocean-operator.fullname" . }} +rules: +- apiGroups: + - "" + resources: + - "*" + verbs: + - get + - list + - watch +- apiGroups: + - "" + resources: + - namespaces + verbs: + - create + - get + - list + - watch +- apiGroups: + - "" + resources: + - secrets + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - "" + resources: + - serviceaccounts + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - "" + resources: + - pods + verbs: + - get + - list + - patch + - update + - watch +- apiGroups: + - apps + resources: + - deployments + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - ocean.spot.io + resources: + - components + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - ocean.spot.io + resources: + - components/status + verbs: + - get + - patch + - update diff --git a/charts/ocean-operator/templates/role_binding.yaml b/charts/ocean-operator/templates/role_binding.yaml new file mode 100644 index 0000000..c52b177 --- /dev/null +++ b/charts/ocean-operator/templates/role_binding.yaml @@ -0,0 +1,26 @@ +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: {{ include "ocean-operator.fullname" . }} +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: manager-role +subjects: +- kind: ServiceAccount + name: {{ include "ocean-operator.serviceAccountName" . }} + namespace: {{ .Release.Namespace }} +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: {{ include "ocean-operator.fullname" . }}-helmadmin +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: cluster-admin +subjects: +- kind: ServiceAccount + name: {{ include "ocean-operator.serviceAccountName" . }} + namespace: {{ .Release.Namespace }} diff --git a/charts/ocean-operator/templates/secret.yaml b/charts/ocean-operator/templates/secret.yaml new file mode 100644 index 0000000..8d10ddf --- /dev/null +++ b/charts/ocean-operator/templates/secret.yaml @@ -0,0 +1,14 @@ +apiVersion: v1 +kind: Secret +metadata: + name: {{ include "ocean-operator.fullname" . }} + labels: + {{- include "ocean-operator.labels" . | nindent 4 }} + {{- with .Values.serviceAccount.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +type: Opaque +data: + token: {{ required "spotinst.token is missing" .Values.spotinst.token | b64enc }} + account: {{ required "spotinst.account is missing" .Values.spotinst.account | b64enc }} diff --git a/charts/ocean-operator/templates/service.yaml b/charts/ocean-operator/templates/service.yaml new file mode 100644 index 0000000..62a63f4 --- /dev/null +++ b/charts/ocean-operator/templates/service.yaml @@ -0,0 +1,16 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ include "ocean-operator.fullname" . }}-metrics + labels: + {{- include "ocean-operator.labels" . | nindent 4 }} +spec: + ports: + - name: metrics + port: 8080 + protocol: TCP + targetPort: metrics + selector: + {{- include "ocean-operator.selectorLabels" . | nindent 4 }} + sessionAffinity: None + type: ClusterIP diff --git a/charts/ocean-operator/templates/service_account.yaml b/charts/ocean-operator/templates/service_account.yaml new file mode 100644 index 0000000..c4bfede --- /dev/null +++ b/charts/ocean-operator/templates/service_account.yaml @@ -0,0 +1,12 @@ +{{- if .Values.serviceAccount.create -}} +apiVersion: v1 +kind: ServiceAccount +metadata: + name: {{ include "ocean-operator.serviceAccountName" . }} + labels: + {{- include "ocean-operator.labels" . | nindent 4 }} + {{- with .Values.serviceAccount.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +{{- end }} diff --git a/charts/ocean-operator/values.yaml b/charts/ocean-operator/values.yaml new file mode 100644 index 0000000..bdadb42 --- /dev/null +++ b/charts/ocean-operator/values.yaml @@ -0,0 +1,112 @@ +# Spotinst configuration. +spotinst: + # -- (Required) Spot Token. + # Ref: https://docs.spot.io/administration/api/create-api-token + token: "" + # -- (Required) Spot Account. + # Ref: https://docs.spot.io/administration/organizations?id=account + account: "" + # -- (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/ + clusterIdentifier: "" + # -- (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 + acdIdentifier: "" + +# Environment bootstrapping. +bootstrap: + # -- (Optional) Enable environment bootstrapping. + enabled: true + # -- (Optional) Namespace where components should be installed during environment bootstrapping. + namespace: "" + # -- (Optional) List of components to install during environment bootstrapping. + components: + - ocean-controller + - metrics-server + +# -- (Optional) Replicas. +# Ref: https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#replicas +replicaCount: 1 + +# Image. +# Ref: https://kubernetes.io/docs/concepts/containers/images/ +image: + # -- (Optional) Image repository. + repository: gcr.io/spotinst-artifacts/ocean-operator + # -- (Optional) Image pull policy. + pullPolicy: IfNotPresent + # -- (Optional) Image pull secrets. + pullSecrets: [] + # -- (Optional) Image tag. Defaults to `.Chart.AppVersion`. + tag: "" + +# -- (Optional) String to partially override `ocean-operator.fullname` template (will maintain the release name). +nameOverride: "" +# -- (Optional) String to fully override `ocean-operator.fullname` template. +fullnameOverride: "" + +# Service account. +# Ref: +serviceAccount: + # -- (Optional) Controls whether a service account should be created. + create: true + # -- (Optional) Service account annotations. + annotations: {} + # -- (Optional) Service account name. + name: ocean-operator + +# -- (Optional) Pod annotations. +# Ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ +podAnnotations: {} + +# -- (Optional) Pod security context. +# Ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-pod +podSecurityContext: {} + # fsGroup: 2000 + +# -- (Optional) Container security context. +# Ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-container +securityContext: {} + # capabilities: + # drop: + # - ALL + # readOnlyRootFilesystem: true + # runAsNonRoot: true + # runAsUser: 1000 + +# -- (Optional) Resource requests and limits. +# Ref: http://kubernetes.io/docs/user-guide/compute-resources/ +resources: + limits: + cpu: 500m + memory: 500Mi + requests: + cpu: 50m + memory: 50Mi + +# -- (Optional) Node selector. +nodeSelector: {} + +# -- (Optional) Tolerations for nodes that have taints on them. +# Ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ +tolerations: [] + +# Pod scheduling preferences. +# Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity +affinity: + # -- (Optional) Node affinity. + nodeAffinity: + preferredDuringSchedulingIgnoredDuringExecution: + - weight: 1 + preference: + matchExpressions: + - key: spotinst.io/node-lifecycle + operator: In + values: + - od + +# -- (Optional) Additional arguments. +# Ref: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container +extraArgs: []