diff --git a/README.md b/README.md index 6b646c02..704cced1 100644 --- a/README.md +++ b/README.md @@ -37,6 +37,7 @@ The charts are published to the OCI registry at `oci://us-west1-docker.pkg.dev/d - [op-challenger](./charts/op-challenger/README.md) - A Helm chart for Fault Proof Monitoring - [op-conductor](./charts/op-conductor/README.md) - Helm chart deploying OP Conductor, a HA controller for op-node - [op-conductor-mon](./charts/op-conductor-mon/README.md) - A Helm chart for OP Conductor monitoring +- [op-conductor-ops](./charts/op-conductor-ops/README.md) - Celo implementation for OP conductor-ops - [op-conductor-start-tool](./charts/op-conductor-start-tool/README.md) - OP Conductor start tool Cel2 network - [op-dispute-mon](./charts/op-dispute-mon/README.md) - A Helm chart for Fault Proof Monitoring - [op-geth](./charts/op-geth/README.md) - Celo implementation for op-geth execution engine (Optimism Rollup) diff --git a/charts/op-conductor-ops/.helmignore b/charts/op-conductor-ops/.helmignore new file mode 100644 index 00000000..0e8a0eb3 --- /dev/null +++ b/charts/op-conductor-ops/.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/op-conductor-ops/Chart.yaml b/charts/op-conductor-ops/Chart.yaml new file mode 100644 index 00000000..9ef4fae8 --- /dev/null +++ b/charts/op-conductor-ops/Chart.yaml @@ -0,0 +1,25 @@ +apiVersion: v2 +name: op-conductor-ops +description: Celo implementation for OP conductor-ops +type: application +version: 0.0.1 +appVersion: "v0.0.1" +home: https://clabs.co +sources: + - https://celo.org + - https://docs.celo.org + - https://clabs.co + - https://github.com/celo-org +keywords: + - celo + - blockchain + - optimism + - rollup + - ethereum + - layer2 + - op-stack + - conductor +maintainers: + - name: cLabs + email: devops@clabs.co + url: https://clabs.co diff --git a/charts/op-conductor-ops/README.md b/charts/op-conductor-ops/README.md new file mode 100644 index 00000000..75728c83 --- /dev/null +++ b/charts/op-conductor-ops/README.md @@ -0,0 +1,48 @@ +# op-conductor-ops + +![Version: 0.0.1](https://img.shields.io/badge/Version-0.0.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v0.0.1](https://img.shields.io/badge/AppVersion-v0.0.1-informational?style=flat-square) + +Celo implementation for OP conductor-ops + +**Homepage:** + +## Maintainers + +| Name | Email | Url | +| ---- | ------ | --- | +| cLabs | | | + +## Source Code + +* +* +* +* + +## Values + +| Key | Type | Default | Description | +|-----|------|---------|-------------| +| affinity | object | `{}` | Kubernetes pod affinity | +| env | object | `{"NETWORK":"alfajores-cel2"}` | Environment variables | +| fullnameOverride | string | `""` | Chart full name override | +| image.pullPolicy | string | `"IfNotPresent"` | Image pullpolicy | +| image.repository | string | `"us-west1-docker.pkg.dev/devopsre/op-conductor-ops/op-conductor-ops"` | Image repository | +| image.tag | string | `"v0.0.1"` | Image tag Overrides the image tag whose default is the chart appVersion. | +| imagePullSecrets | list | `[]` | Image pull secrets | +| nameOverride | string | `""` | Chart name override | +| nodeSelector | object | `{}` | Kubernetes node selector | +| podAnnotations | object | `{}` | Custom pod annotations | +| podLabels | object | `{}` | Custom pod labels | +| podSecurityContext | object | `{}` | Custom pod security context | +| replicaCount | int | `1` | Number of deployment replicas | +| resources | object | `{}` | Container resources | +| securityContext | object | `{}` | Custom container security context | +| serviceAccount.annotations | object | `{}` | Annotations to add to the service account | +| serviceAccount.automount | bool | `true` | Automatically mount a ServiceAccount's API credentials? | +| serviceAccount.create | bool | `true` | Specifies whether a service account should be created | +| serviceAccount.name | string | `""` | The name of the service account to use. If not set and create is true, a name is generated using the fullname template | +| tolerations | list | `[]` | Kubernetes tolerations | + +---------------------------------------------- +Autogenerated from chart metadata using [helm-docs v1.14.2](https://github.com/norwoodj/helm-docs/releases/v1.14.2) diff --git a/charts/op-conductor-ops/templates/_helpers.tpl b/charts/op-conductor-ops/templates/_helpers.tpl new file mode 100644 index 00000000..bc25cec5 --- /dev/null +++ b/charts/op-conductor-ops/templates/_helpers.tpl @@ -0,0 +1,62 @@ +{{/* +Expand the name of the chart. +*/}} +{{- define "op-conductor-ops.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 "op-conductor-ops.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 "op-conductor-ops.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{/* +Common labels +*/}} +{{- define "op-conductor-ops.labels" -}} +helm.sh/chart: {{ include "op-conductor-ops.chart" . }} +{{ include "op-conductor-ops.selectorLabels" . }} +{{- if .Chart.AppVersion }} +app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} +{{- end }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +{{- end }} + +{{/* +Selector labels +*/}} +{{- define "op-conductor-ops.selectorLabels" -}} +app.kubernetes.io/name: {{ include "op-conductor-ops.name" . }} +app.kubernetes.io/instance: {{ .Release.Name }} +{{- end }} + +{{/* +Create the name of the service account to use +*/}} +{{- define "op-conductor-ops.serviceAccountName" -}} +{{- if .Values.serviceAccount.create }} +{{- default (include "op-conductor-ops.fullname" .) .Values.serviceAccount.name }} +{{- else }} +{{- default "default" .Values.serviceAccount.name }} +{{- end }} +{{- end }} diff --git a/charts/op-conductor-ops/templates/deployment.yaml b/charts/op-conductor-ops/templates/deployment.yaml new file mode 100644 index 00000000..389aa775 --- /dev/null +++ b/charts/op-conductor-ops/templates/deployment.yaml @@ -0,0 +1,57 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ include "op-conductor-ops.fullname" . }} + labels: + {{- include "op-conductor-ops.labels" . | nindent 4 }} +spec: + replicas: {{ .Values.replicaCount }} + selector: + matchLabels: + {{- include "op-conductor-ops.selectorLabels" . | nindent 6 }} + template: + metadata: + annotations: + {{- with .Values.podAnnotations }} + {{- toYaml . | nindent 8 }} + {{- end }} + labels: + {{- include "op-conductor-ops.labels" . | nindent 8 }} + {{- with .Values.podLabels }} + {{- toYaml . | nindent 8 }} + {{- end }} + spec: + {{- with .Values.imagePullSecrets }} + imagePullSecrets: + {{- toYaml . | nindent 8 }} + {{- end }} + serviceAccountName: {{ include "op-conductor-ops.serviceAccountName" . }} + securityContext: + {{- toYaml .Values.podSecurityContext | nindent 8 }} + containers: + - name: {{ .Chart.Name }} + securityContext: + {{- toYaml .Values.securityContext | nindent 12 }} + image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" + imagePullPolicy: {{ .Values.image.pullPolicy }} + {{- with .Values.env }} + env: + {{- range $key, $value := . }} + - name: {{ $key }} + value: {{ $value | quote }} + {{- end }} + {{- end }} + 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/op-conductor-ops/templates/serviceaccount.yaml b/charts/op-conductor-ops/templates/serviceaccount.yaml new file mode 100644 index 00000000..aecb4efb --- /dev/null +++ b/charts/op-conductor-ops/templates/serviceaccount.yaml @@ -0,0 +1,13 @@ +{{- if .Values.serviceAccount.create -}} +apiVersion: v1 +kind: ServiceAccount +metadata: + name: {{ include "op-conductor-ops.serviceAccountName" . }} + labels: + {{- include "op-conductor-ops.labels" . | nindent 4 }} + {{- with .Values.serviceAccount.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +automountServiceAccountToken: {{ .Values.serviceAccount.automount }} +{{- end }} diff --git a/charts/op-conductor-ops/values.yaml b/charts/op-conductor-ops/values.yaml new file mode 100644 index 00000000..613f0ca2 --- /dev/null +++ b/charts/op-conductor-ops/values.yaml @@ -0,0 +1,78 @@ +# Default values for op-conductor-ops. +# This is a YAML-formatted file. +# Declare variables to be passed into your templates. + +# -- Chart name override +nameOverride: "" +# -- Chart full name override +fullnameOverride: "" + +# -- Number of deployment replicas +replicaCount: 1 + +image: + # -- Image repository + repository: us-west1-docker.pkg.dev/devopsre/op-conductor-ops/op-conductor-ops + # -- Image pullpolicy + pullPolicy: IfNotPresent + # -- Image tag + # Overrides the image tag whose default is the chart appVersion. + tag: "v0.0.1" + +# -- Environment variables +env: + NETWORK: "alfajores-cel2" + +serviceAccount: + # -- Specifies whether a service account should be created + create: true + # -- Automatically mount a ServiceAccount's API credentials? + automount: true + # -- Annotations to add to the service account + annotations: {} + # -- The name of the service account to use. If not set and create is true, a name is generated using the fullname template + name: "" + +# -- Image pull secrets +imagePullSecrets: [] + +# -- Custom pod annotations +podAnnotations: {} + +# -- Custom pod labels +podLabels: {} + +# -- Custom pod security context +podSecurityContext: {} + # fsGroup: 2000 + +# -- Custom container security context +securityContext: {} + # capabilities: + # drop: + # - ALL + # readOnlyRootFilesystem: true + # runAsNonRoot: true + # runAsUser: 1000 + +# -- Container resources +resources: {} + # We usually recommend not to specify default resources and to leave this as a conscious + # choice for the user. This also increases chances charts run on environments with little + # resources, such as Minikube. If you do want to specify resources, uncomment the following + # lines, adjust them as necessary, and remove the curly braces after 'resources:'. + # limits: + # cpu: 100m + # memory: 128Mi + # requests: + # cpu: 100m + # memory: 128Mi + +# -- Kubernetes node selector +nodeSelector: {} + +# -- Kubernetes tolerations +tolerations: [] + +# -- Kubernetes pod affinity +affinity: {}