I’m attempting to install both the infisical standalone and the infisial secrets operator on my cluster ( I only have one self hosted machine for now ).
Is it possible to install both on the same cluster in the first place ? I am not seeing anything obvious in the documentation stating otherwise https://infisical.com/docs/documentation/getting-started/introduction
Running the standalone helm there are no issues at all and I can access the webui as intended ( just need to enable the access in the values.yaml )
https://infisical.com/docs/self-hosting/deployment-options/kubernetes-helm
I ran it as follows :
helm repo add infisical-helm-charts 'https://dl.cloudsmith.io/public/infisical/helm-charts/helm/charts/'
helm repo update
export INFISICAL_AUTH_SECRET="secret here"
export INFISICAL_ENCRYPTION_KEY="key here"
kubectl create namespace infisical
kubectl create secret generic infisical-secrets --from-literal=AUTH_SECRET="$(echo $INFISICAL_AUTH_SECRET)" --from-literal=ENCRYPTION_KEY="$(echo $INFISICAL_ENCRYPTION_KEY)" --namespace infisical
helm upgrade --install infisical infisical-helm-charts/infisical-standalone --values kube-archi/infisical/infisical-values.yaml --generate-name --namespace infisical
While using this values.yaml file :
ingress:
enabled: true
nginx:
enabled: true
I then end up with the following :
kubectl get all -n infisical
NAME READY STATUS RESTARTS AGE
pod/infisical-ingress-nginx-controller-697b6b77b6-qbnhx 1/1 Running 0 131m
pod/postgresql-0 1/1 Running 0 131m
pod/redis-master-0 1/1 Running 0 131m
pod/infisical-schema-migration-1-jv6rv 0/1 Completed 2 131m
pod/infisical-infisical-standalone-infisical-5bc78767b5-j9tms 1/1 Running 0 131m
pod/infisical-infisical-standalone-infisical-5bc78767b5-fkg99 1/1 Running 0 131m
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
service/redis-headless ClusterIP None <none> 6379/TCP 131m
service/postgresql-hl ClusterIP None <none> 5432/TCP 131m
service/infisical-ingress-nginx-controller-admission ClusterIP 10.43.210.242 <none> 443/TCP 131m
service/infisical-infisical-standalone-infisical ClusterIP 10.43.252.0 <none> 8080/TCP 131m
service/postgresql ClusterIP 10.43.149.129 <none> 5432/TCP 131m
service/redis-master ClusterIP 10.43.22.53 <none> 6379/TCP 131m
service/infisical-ingress-nginx-controller LoadBalancer 10.43.85.253 <pending> 80:31934/TCP,443:31263/TCP 131m
NAME READY UP-TO-DATE AVAILABLE AGE
deployment.apps/infisical-ingress-nginx-controller 1/1 1 1 131m
deployment.apps/infisical-infisical-standalone-infisical 2/2 2 2 131m
NAME DESIRED CURRENT READY AGE
replicaset.apps/infisical-ingress-nginx-controller-697b6b77b6 1 1 1 131m
replicaset.apps/infisical-infisical-standalone-infisical-5bc78767b5 2 2 2 131m
NAME READY AGE
statefulset.apps/postgresql 1/1 131m
statefulset.apps/redis-master 1/1 131m
NAME COMPLETIONS DURATION AGE
job.batch/infisical-schema-migration-1 1/1 26s 131m
The problems then arise when I attempt to install the secrets operator ( https://infisical.com/docs/integrations/platforms/kubernetes ) in the namespace I use for my project :
helm install --generate-name infisical-helm-charts/secrets-operator --namespace stb
Error: INSTALLATION FAILED: Unable to continue with install: CustomResourceDefinition "infisicalsecrets.secrets.infisical.com" in namespace "" exists and cannot be imported into the current release: invalid ownership metadata; annotation validation error: key "meta.helm.sh/release-name" must equal "secrets-operator-1723739381": current value is "secrets-operator-1723676139"
When getting the list of custom resource definitions, I see that there is already one that has been defined:
kubectl get customresourcedefinition
NAME CREATED AT
addons.k3s.cattle.io 2024-02-20T18:14:56Z
etcdsnapshotfiles.k3s.cattle.io 2024-02-20T18:14:56Z
helmcharts.helm.cattle.io 2024-02-20T18:14:56Z
helmchartconfigs.helm.cattle.io 2024-02-20T18:14:56Z
...
infisicalsecrets.secrets.infisical.com 2024-08-14T22:55:39Z
I’m at a loss as to what to do here. I would rather not use a second kubernetes cluster if possible as it will add a whole lot more complexity that I would rather not deal with ( I only have one self hosted k3s ).
Is there a workaround with Helm ? Should I not use helm for one of the two ( there is an option to install using kubectl only ) ? Would that create security issues related to updates ?
My problem as of now is that I do not understand if I am attempting to do something that is not intended by infisical ( and in which case I should stop ) or if I need to find an other path.
The intended outcome is to have the infisical secrets operator sync the kubernetes secrets with the infisical itself. This allows me to have the secrets be secured and not in the default base 64. It also allows me to change a secret in the WebUI and have infisical re run all the pods using the secret in question.
2