-
Notifications
You must be signed in to change notification settings - Fork 14
feat: add global certificate management for ZTVP applications #83
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
fd1ada7 to
6407ec3
Compare
sabre1041
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking really good. A few comments
| memory: 128Mi | ||
| limits: | ||
| cpu: 200m | ||
| memory: 256Mi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Recommend increasing these values. My cluster OOMKilled the container
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
increased, this size mismatch was due to the addition of proxy CA extraction.
.github/workflows/superlinter.yml
Outdated
| # These are the validation we disable atm | ||
| VALIDATE_ANSIBLE: false | ||
| VALIDATE_BASH: false | ||
| VALIDATE_BASH_EXEC: false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this because we do not set the execute bit on the file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The shell script was a helm template, which has the helm syntax inside, bash_exec cannot pass it. I've updated the filename to avoid this single file's bash_exec linter execution.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What I usually do in these cases is have a simple script and control the variables and conditions using environment variables. Another option is to have source files and import them depending on the environment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The FILTER_REGEX_EXCLUDE option also works for me
cfa46e0 to
cd77935
Compare
…Files Implements comprehensive certificate management for ZTVP: Certificate Sources: - Primary custom CA via secretRef (customCA.secretRef) - Additional certificates via extraValueFiles (overrides/values-ztvp-certificates.yaml) - Auto-detected proxy CA from trusted-ca-bundle (openshift-config-managed) - Auto-detected ingress CA from all IngressControllers (not just default) - Auto-detected service CA from openshift-service-ca Features: - Initial Job for immediate certificate extraction on install - CronJob for periodic certificate rotation (daily at 2 AM) - Warning and continue behavior for missing additional certificates - Automatic rollout restart for consuming applications (labeled strategy) - ACM Policy distribution to target namespaces Configuration: - Use extraValueFiles for complex nested structures (additionalCertificates, rollout) - Simple overrides via values-hub.yaml for flat key-value pairs Signed-off-by: Min Zhang <[email protected]>
cd77935 to
4349ad5
Compare
|
I think it might be interesting to extend the functionality to 2 additional components External Secrets OperatorCurrently, the caProvider:
key: ca.crt
name: kube-root-ca.crt
namespace: golang-external-secrets
type: ConfigMapThis can be configured via an override in golang-external-secrets:
name: golang-external-secrets
namespace: golang-external-secrets
project: hub
chart: golang-external-secrets
chartVersion: 0.1.*
overrides:
- name: golangExternalSecrets.caProvider.hostCluster.name
value: ztvp-trusted-ca
- name: golangExternalSecrets.caProvider.hostCluster.key
value: tls-ca-bundle.pem
- name: golangExternalSecrets.caProvider.hostCluster.namespace
value: openshift-configShould we change it permanently if we adopt this solution? Image registries (Quay)The cluster can use image registries that use internal certificates. In this case, the configuration is done in the apiVersion: config.openshift.io/v1
kind: Image
name: cluster
spec:
additionalTrustedCA:
name: ztvp-registry-trusted-caThe apiVersion: v1
data:
quay-registry-quay-quay-enterprise.apps.example.domain: |
-----BEGIN CERTIFICATE-----
... ...
kind: ConfigMap
metadata:
name: ztvp-registry-trusted-ca
namespace: openshift-configThis functionality would allow configuring CRI-O on the nodes to download images from registries with internal certificates. |
Add ztvp-certificates chart for managing trusted CA certificates across all ZTVP applications with support for custom certificates via Kubernetes secret references.
Key features:
Certificate Sources:
Configuration:
Chart deploys:
Applications can consume the CA bundle by: