connect

by 1Password

Helm chartv2.4.3App 1.8.4

A Helm chart for deploying 1Password Connect and the 1Password Connect Kubernetes Operator

About this chart

1Password Connect

Deploying 1Password Connect

Installing the Helm Chart with default configurations will deploy 1Password Connect in your default Namespace. However, Using 1Password Connect in Kubernetes requires that a 1password-credentials.json file be stored as a Kubernetes Secret. This credentials file can be saved as a Kubernetes secret by setting the file in your helm install command:

helm install connect 1password/connect --set-file connect.credentials=<path/to/1password-credentials.json>

More information about 1Password Connect and how to generate a 1password-credentials.json file can be found at https://support.1password.com/secrets-automation/.

1Password Connect Kubernetes Operator

Deploying 1Password Connect Kubernetes Operator

In order to deploy the 1Password Connect Kubernetes Operator along side 1Password Connect --set operator.create=true in your install command.

Please note the following:

This operator expects that a secret containing an API token for 1Password Connect is saved to the configured namespace. Creation of a secret for the token can be automated by the Helm Chart by using --set operator.token.value=<token>.

If you would prefer to create the token secret manually, the token can be saved as a Kubernetes secret using the following command:

kubectl create secret generic <token-name> --from-literal=token=<OP_CONNECT_TOKEN> --namespace=<namespace>

More information about 1Password Connect and how to generate a 1Password Connect API token can be found at https://support.1password.com/secrets-automation/.

To deploy the Kubernetes operator without also deploying 1Password Connect (for example, to deploy multiple operators on a single cluster), use --set connect.create=false in your install command.

Configuration Values

The 1Password Connect Helm chart offers many configuration options for deployment. Please refer to the list below for information on what configuration options are available as well as what the default configuration options are.

From the Official Helm Install Guide:

To override values in a chart, use either the '--values' flag and pass in a file or use the '--set' flag and pass configuration from the command line, to force a string value use '--set-string'. In case a value is large and therefore you want not to use neither '--values' nor '--set', use '--set-file' to read the single large value from file.

For example:

helm install -f myvalues.yaml connect ./connect

or

helm install --set connect.applicationName=connect connect ./connect

Custom Environment Variables

Some containers support additional environment variables beyond those explicitly defined in the Helm chart. These can be defined using a key map for each custom variable. An example of adding custom variables to the connect container is shown below:

connect:
  customEnvVars:
    - name: "CUSTOM_ENV_VAR1"
      value: "customvar2"
    - name: "CUSTOM_ENV_VAR2"
      value: "customvar2"

CRD

By default, the chart will also install the OnePasswordItem CRD. To disable this, you can run helm install with the --skip-crds flag.

Values

KeyTypeDefaultDescription
acceptanceTests.enabledboolfalseEnable acceptance tests for the chart
acceptanceTests.fixturesobject{}Test fixtures configuration for acceptance tests
acceptanceTests.healthCheck.enabledbooltrueEnable the health check test
acceptanceTests.healthCheck.image.repositorystring"docker.io/curlimages/curl"The image repository for the health check test container
acceptanceTests.healthCheck.image.tagstring"latest"The image tag for the health check test container
acceptanceTests.podSecurityContextobject{"fsGroup":65532,"runAsGroup":65532,"runAsNonRoot":true,"runAsUser":65532,"seccompProfile":{"type":"RuntimeDefault"}}Pod securityContext to be added to the acceptance test pods.
acceptanceTests.securityContextobject{"allowPrivilegeEscalation":false,"capabilities":{"drop":["ALL"]},"readOnlyRootFilesystem":true}Container securityContext to be added to the acceptance test containers.
commonLabelsobject{}Global common labels, applied to all resources
connect.affinityobject{}Affinity rules for the Connect pod
connect.annotationsobject{}Additional annotations to be added to the Connect API deployment resource.
connect.api.httpPortint8080The port the Connect API is served on when TLS is disabled
connect.api.httpsPortint8443The port the Connect API is served on when TLS is enabled
connect.api.imageRepositorystring"docker.io/1password/connect-api"The 1Password Connect API repository
connect.api.logLevelstring"info"Log level of the Connect API container. Valid options are: trace, debug, info, warn, error.
connect.api.namestring"connect-api"The name of the 1Password Connect API container
connect.api.resourcesobject{"limits":{"memory":"128Mi"},"requests":{"cpu":0.2}}The resources requests/limits for the 1Password Connect API pod
connect.api.securityContextobject{"allowPrivilegeEscalation":false,"capabilities":{"drop":["ALL"]},"readOnlyRootFilesystem":true}Container securityContext to be added to the Connect API containers.
connect.api.serviceMonitor.annotationsobject{}Extra annotations for the ServiceMonitor
connect.api.serviceMonitor.enabledboolfalseCreate ServiceMonitor Resource for scraping metrics using PrometheusOperator
connect.api.serviceMonitor.intervalstring"30s"Specify the interval at which metrics should be scraped
connect.api.serviceMonitor.paramsobject{}Define the HTTP URL parameters used by ServiceMonitor
connect.api.serviceMonitor.pathstring"/metrics"Define the path used by ServiceMonitor to scrape metrics
connect.applicationNamestring"onepassword-connect"The name of 1Password Connect Application
connect.createbooltrueDenotes whether the 1Password Connect server will be deployed
connect.credentialsstringnilContents of the 1password-credentials.json file for Connect. Can be set be adding --set-file connect.credentials=<path/to/1password-credentials.json> to your helm install command
connect.credentialsKeystring"1password-credentials.json"The key for the 1Password Connect Credentials stored in the credentials secret
connect.credentialsNamestring"op-credentials"The name of Kubernetes Secret containing the 1Password Connect credentials
connect.credentials_base64stringnilBase64-encoded contents of the 1password-credentials.json file for Connect. This can be used instead of connect.credentials in case supplying raw JSON to connect.credentials leads to issues.
connect.customEnvVarslist[]Custom Environment Variables for the 1Password Connect container.
connect.dataVolume.namestring"shared-data"The name of the shared volume used between 1Password Connect Containers
connect.dataVolume.typestring"emptyDir"The type of the shared volume used between 1Password Connect Containers
connect.dataVolume.valuesobject{}Describes the fields and values for configuration of shared volume for 1Password Connect
connect.hoststring"onepassword-connect"The name of 1Password Connect Host
connect.hpa.annotationsobject{}Additional annotations to be added to the HPA Connect
connect.hpa.avgCpuUtilizationint50Average CPU utilization percentage for the Connect pod
connect.hpa.avgMemoryUtilizationint50Average Memory utilization percentage for the Connect pod
connect.hpa.behaviorobject{}Defines the Autoscaling Behavior in up/down directions
connect.hpa.enabledboolfalseEnable Horizontal Pod Autoscaling for the Connect pod
connect.hpa.maxReplicasint3Maximum number of replicas for the Connect pod
connect.hpa.minReplicasint1Minimum number of replicas for the Connect pod
connect.imagePullPolicystring"IfNotPresent"The 1Password Connect API image pull policy
connect.imagePullSecretslist[]List of secret names to use as image pull secrets. Secrets must exist in the same namespace.
connect.ingress.annotationsobject{}The 1Password Connect Ingress Annotations
connect.ingress.enabledboolfalseThe boolean value to enable/disable the 1Password Connect Ingress
connect.ingress.extraPathslist[]Additional Ingress Paths
connect.ingress.ingressClassNamestring""Optionally use ingressClassName instead of deprecated annotation.
connect.ingress.labelsobject{}Ingress labels for 1Password Connect
connect.ingress.pathTypestring"Prefix"Ingress PathType see docs
connect.ingress.tlslist[]Ingress TLS see docs
connect.labelsobject{}Additional labels to be added to the Connect API deployment resource.
connect.nodeSelectorobject{}Node selector stanza for the Connect pod
connect.pdb.annotationsobject{}Additional annotations to be added to the PDB Connect
connect.pdb.enabledboolfalseEnable Pod Disruption Budget for the Connect pod
connect.pdb.maxUnavailableint1Number of pods that are unavailable after eviction as number or percentage (eg.: 50%)
connect.pdb.minAvailableint0Number of pods that are available after eviction as number or percentage (eg.: 50%)
connect.podAnnotationsobject{}Additional annotations to be added to the Connect API pods.
connect.podLabelsobject{}Additional labels to be added to the Connect API pods.
connect.podSecurityContextobject{"fsGroup":999,"runAsGroup":999,"runAsNonRoot":true,"runAsUser":999,"seccompProfile":{"type":"RuntimeDefault"}}Pod securityContext to be added to the Connect pods.
connect.priorityClassNamestring""priorityClassName to apply to the Connect API deployment resource.
connect.probes.livenessbooltrueDenotes whether the 1Password Connect API will be continually checked by Kubernetes for liveness and restarted if the pod becomes unresponsive
connect.probes.readinessbooltrueDenotes whether the 1Password Connect API readiness probe will operate and ensure the pod is ready before serving traffic
connect.profiler.enabledboolfalseEnable the internal profiler to debug memory or performance issues. For normal operation this does not have to be enabled.
connect.profiler.intervalstring"6h"The interval at which profiler snapshots are taken.
connect.profiler.keepLastint12Number of profiler snapshots to keep.
connect.replicasint1The number of replicas to run the 1Password Connect deployment
connect.serviceAccount.annotationsobject{}Annotations for the 1Password Connect Service Account
connect.serviceAccount.createboolfalseCreate service account for the 1Password Connect deployment
connect.serviceAccount.namestring"onepassword-connect"The name of the 1Password Connect Service Account
connect.serviceAnnotationsobject{}Additional annotations to be added to the service.
connect.serviceTypestring"ClusterIP"The type of Service resource to create for the Connect API and sync services.
connect.sync.httpPortint8081The port serving the health of the Sync container
connect.sync.imageRepositorystring"docker.io/1password/connect-sync"The 1Password Connect Sync repository
connect.sync.logLevelstring"info"Log level of the Connect Sync container. Valid options are: trace, debug, info, warn, error.
connect.sync.namestring"connect-sync"The name of the 1Password Connect Sync container
connect.sync.resourcesobject{}The resources requests/limits for the 1Password Connect Sync pod
connect.sync.securityContextobject{"allowPrivilegeEscalation":false,"capabilities":{"drop":["ALL"]},"readOnlyRootFilesystem":true}Container securityContext to be added to the Connect Sync containers.
connect.tls.enabledboolfalseDenotes whether the Connect API is secured with TLS
connect.tls.secretstring"op-connect-tls"The name of the secret containing the TLS key (tls.key) and certificate (tls.crt)
connect.tolerationslist[]List of tolerations to be added to the Connect API pods.
connect.versionstring"{{ .Chart.AppVersion }}"The 1Password Connect version to pull
operator.affinityobject{}Affinity rules for the Operator pod
operator.allowEmptyValuesboolfalsePasses the --allow-empty-values flag to the Operator container that allows adding fields with empty values to Kubernetes secrets when true
operator.annotationsobject{}Additional annotations to be added to the Operator deployment resource.
operator.applicat

Deploy connect with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has connect on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartconnect is pinned at v2.4.3 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply