Documentation Index
Fetch the complete documentation index at: https://infisical-saif-eng-4890-add-support-for-oracle-db-access-in.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Overview
The InfisicalPushSecret CRD allows you to create secrets in your Kubernetes cluster and push them to Infisical. This CRD offers the following features:- Push Secrets from a Kubernetes secret into Infisical.
- Manage secret lifecycle of pushed secrets in Infisical. When the Kubernetes secret is updated, the operator will automatically update the secrets in Infisical. Optionally, when the Kubernetes secret is deleted, the operator will delete the secrets in Infisical automatically.
Prerequisites
- A project within Infisical.
- A machine identity ready for use in Infisical that has permissions to create secrets in your project.
- The operator is installed on to your Kubernetes cluster.
Example usage
Below is a sample InfisicalPushSecret CRD that pushes secrets defined in a Kubernetes secret to Infisical. After filling out the fields in the InfisicalPushSecret CRD, you can apply it directly to your cluster. Before applying the InfisicalPushSecret CRD, you need to create a Kubernetes secret containing the secrets you want to push to Infisical. An example can be seen below the InfisicalPushSecret CRD.InfisicalPushSecret CRD properties
hostAPI
hostAPI
hostAPI to
https://your-self-hosted-instace.com/apiWhen hostAPI is not defined the operator fetches secrets from Infisical Cloud.Advanced use case
Advanced use case
<backend-svc-name> and <namespace> with the appropriate values for your backend service and namespace.resyncInterval
resyncInterval
resyncInterval is a string-formatted duration that defines the time between each resync. The field is optional, and will default to no automatic resync if not defined.If you don’t want to automatically reconcile the InfisicalPushSecret CRD on an interval, you can remove the resyncInterval field entirely from your InfisicalPushSecret CRD.The format of the field is [duration][unit] where duration is a number and unit is a string representing the unit of time.The following units are supported:sfor seconds (must be at least 5 seconds)mfor minuteshfor hoursdfor dayswfor weeks
1m (1 minute).Valid intervals examples:updatePolicy
updatePolicy
None if not defined.The update policy defines how the operator should handle conflicting secrets when pushing secrets to Infisical.Valid values are None and Replace.Behavior of each policy:None: The operator will not override existing secrets in Infisical. If a secret with the same key already exists, the operator will skip pushing that secret, and the secret will not be managed by the operator.Replace: The operator will replace existing secrets in Infisical with the new secrets. If a secret with the same key already exists, the operator will update the secret with the new value.
deletionPolicy
deletionPolicy
None if not defined.The deletion policy defines what the operator should do in case the InfisicalPushSecret CRD is deleted.Valid values are None and Delete.Behavior of each policy:None: The operator will not delete the secrets in Infisical when the InfisicalPushSecret CRD is deleted.Delete: The operator will delete the secrets in Infisical that are managed by the operator when the InfisicalPushSecret CRD is deleted.
destination
destination
destination field is used to specify where you want to create the secrets in Infisical. The required fields are projectId, environmentSlug, and secretsPath.destination.projectId
destination.projectId
projectId or projectSlug in the destination field.destination.projectSlug
destination.projectSlug
projectId or projectSlug in the destination field.destination.environmentSlug
destination.environmentSlug
destination.secretsPath
destination.secretsPath
/.push
push
push field is used to define what you want to push to Infisical. Currently the operator only supports pushing Kubernetes secrets to Infisical. An example of the push field is shown below.secret
secret
secret field is used to define the Kubernetes secret you want to push to Infisical. The required fields are secretName and secretNamespace.Example usage of the push.secret field:generators[]
generators[]
generators[] field is used to define the generators you want to use for your InfisicalPushSecret CRD.
You can follow the guide for using generators to push secrets for more information.Example:authentication
authentication
authentication field dictates which authentication method to use when pushing secrets to Infisical.
The available authentication methods are universalAuth, kubernetesAuth, awsIamAuth, azureAuth, gcpIdTokenAuth, and gcpIamAuth.universalAuth
universalAuth
identityId: The identity ID of the machine identity you created.credentialsRef: The name and namespace of the Kubernetes secret that stores the service token.credentialsRef.secretName: The name of the Kubernetes secret.credentialsRef.secretNamespace: The namespace of the Kubernetes secret.
kubernetesAuth
kubernetesAuth
identityId: The identity ID of the machine identity you created.serviceAccountRef: The name and namespace of the service account that will be used to authenticate with Infisical.serviceAccountRef.name: The name of the service account.serviceAccountRef.namespace: The namespace of the service account.autoCreateServiceAccountToken: If set totrue, the operator will automatically create a short-lived service account token on-demand for the service account. Defaults tofalse.serviceAccountTokenAudiences: Optionally specify audience for the service account token. This field is only relevant if you have setautoCreateServiceAccountTokentotrue. No audience is specified by default.
ldapAuth
ldapAuth
identityId: The identity ID of the machine identity you created.credentialsRef: The name and namespace of the Kubernetes secret that stores the LDAP credentials.credentialsRef.secretName: The name of the Kubernetes secret.credentialsRef.secretNamespace: The namespace of the Kubernetes secret.
awsIamAuth
awsIamAuth
identityId: The identity ID of the machine identity you created.
azureAuth
azureAuth
identityId: The identity ID of the machine identity you created.
gcpIamAuth
gcpIamAuth
identityId: The identity ID of the machine identity you created.serviceAccountKeyFilePath: The path to the GCP service account key file.
gcpIdTokenAuth
gcpIdTokenAuth
identityId: The identity ID of the machine identity you created.
tls
tls
caRef
caRef
secretName: The name of the Kubernetes secret containing the CA certificate to use for connecting to the Infisical instance with SSL/TLS.secretNamespace: The namespace of the Kubernetes secret containing the CA certificate to use for connecting to the Infisical instance with SSL/TLS.key: The name of the key in the Kubernetes secret which contains the value of the CA certificate to use for connecting to the Infisical instance with SSL/TLS.
Using templating to push secrets
Pushing secrets to Infisical from the operator may not always be enough. Templating is a useful utility of the Infisical secrets operator that allows you to use Go Templating to template the secrets you want to push to Infisical. Using Go templates, you can format, combine, and create new key-value pairs of secrets that you want to push to Infisical.push.secret.template
push.secret.template
push.secret.template.includeAllSecrets
push.secret.template.includeAllSecrets
true, all secrets included in the push.secret.secretName Kubernetes secret will be pushed to Infisical.
Use this option when you would like to push all secrets to Infisical from the secrets operator, but want to template a subset of them.When set to false, only secrets defined in the push.secret.template.data field of the template will be pushed to Infisical.
Use this option when you would like to push only a subset of secrets from the Kubernetes secret to Infisical.push.secret.template.data
push.secret.template.data
push.secret.secretName Kubernetes secret.Secrets are structured as follows:Example template configuration:
Available templating functions
Please refer to the templating functions documentation for more information.Using generators to push secrets
Generators allow secrets to be dynamically generated during each reconciliation cycle and then pushed to Infisical. They are useful for use cases where a new secret value is needed on every sync, such as ephemeral credentials or one-time-use tokens. A generator is defined as a custom resource (ClusterGenerator) within the cluster, which specifies the logic for generating secret values. Generators are stateless, each invocation triggers the creation of a new set of values, with no tracking or persistence of previously generated data.
Because of this behavior, you may want to disable automatic syncing for the InfisicalPushSecret resource to avoid continuous regeneration of secrets. This can be done by omitting the resyncInterval field from the InfisicalPushSecret CRD.
Example usage
push.generators[] field.
push.generators[]
push.generators[]
push.generators[].destinationSecretName
push.generators[].destinationSecretName
push.generators[].generatorRef
push.generators[].generatorRef
kind: The kind of the generator resource, must match the generator kind.name: The name of the generator resource.
push.generators[].generatorRef.kind
push.generators[].generatorRef.kind
PasswordUUID
push.generators[].generatorRef.name
push.generators[].generatorRef.name
Supported Generators
Below are the currently supported generators for the InfisicalPushSecret CRD. Each generator is aClusterGenerator custom resource that can be used to customize the generated secret.
Password Generator
Password Generator
Password Generator
The Password generator is a custom resource that is installed on the cluster that defines the logic for generating a password.kind: The kind of the generator resource, must match the generator kind. For the Password generator, the kind isPassword.generator.passwordSpec: The spec of the password generator.
generator.kind
generator.kind
generator.kind field must match the kind of the generator resource. For the Password generator, the kind should always be set to Password.generator.passwordSpec
generator.passwordSpec
length: The length of the password.digits: The number of digits in the password.symbols: The number of symbols in the password.symbolCharacters: The characters to use for the symbols in the password.noUpper: Whether to include uppercase letters in the password.allowRepeat: Whether to allow repeating characters in the password.
UUID Generator
UUID Generator
UUID Generator
The UUID generator is a custom resource that is installed on the cluster that defines the logic for generating a UUID.kind: The kind of the generator resource, must match the generator kind. For the UUID generator, the kind isUUID.generator.uuidSpec: The spec of the UUID generator. For UUID’s, this can be left empty.
generator.kind
generator.kind
generator.kind field must match the kind of the generator resource. For the UUID generator, the kind should always be set to UUID.generator.uuidSpec
generator.uuidSpec
Applying the InfisicalPushSecret CRD to your cluster
Once you have configured theInfisicalPushSecret CRD with the required fields, you can apply it to your cluster.
After applying, you should notice that the secrets have been pushed to Infisical.