Issue
When running mxpc-cli apply-config on an OpenShift cluster with auto-generated secrets from Vault Secret Operator (VSO) and ArgoCD, the following error occurs:
Failed to apply Kubernetes Secrets: failed to update secret proxy_secret: Secret "mendix-proxy" is invalid: type: Invalid value: "Opaque": field is immutableThis issue occurs when secrets are created by custom processes (such as VSO with ArgoCD) before running mxpc-cli, causing a conflict because the secret type field is immutable in Kubernetes.
Environment
Applications hosted in Mendix on Kubernetes
Cause
The issue occurs when secrets are pre-created by the VSO and ArgoCD pipeline using the type kubernetes.io/Opaque, while mxpc-clicreates secrets using the type Opaque.
Although these two types are functionally equivalent, Kubernetes treats the secret type field as immutable after creation, resulting in an error.
Solution/Workaround
To resolve this issue, ensure that secrets created by custom processes are fully identical to how mxpc-cli would create them. Choose one of the following approaches:
Option 1: Align custom secret creation with mxpc-cli format (Recommended)
Update the custom secret management process (VSO/ArgoCD) to use the secret type
Opaqueinstead ofkubernetes.io/OpaqueMatch all secret attributes match exactly how
mxpc-clicreates themRun
mxpc-cli apply-config
Option 2: Delete existing secrets and let mxpc-cli manage them
Remove the secrets from the custom management process (VSO/ArgoCD)
Delete the existing secrets from the cluster
Run
mxpc-cli apply-configto allowmxpc-clito create and manage the secrets
Option 3: Use dry-run mode for manual application
Use the dry-run option in
mxpc-clito review the configuration changesApply the changes manually to avoid conflicts with existing secrets
Note: mxpc-cli is only validated to be compatible with processes documented in the official Mendix documentation. If secrets are created by another process, they must be fully identical to how mxpc-cli creates them. External secret management solutions such as VSO and ArgoCD are not officially supported.
Internal information related
264938
Additional information
- Mendix documentation: Mendix for Private Cloud
- External documentation: Kubernetes Secret Types
0 Comments