openshift-gitops

by tjungbauer

Helm chartv1.1.18Apache-2.0Verified publisher

Installs and patches the Red Hat Openshift Gitops Operator

About this chart

openshift-gitops

Description

Installs and patches the Red Hat Openshift Gitops Operator

Install and configure an Argo CD instance...

With this Helm chart, OpenShift Gitops can be deployed and configured. By default, the operator will deploy the first instance automatically, which be used and patched, but also additional instances can be deployed by this Chart.

Dependencies

This chart has the following dependencies:

RepositoryNameVersion
https://charts.stderr.at/helper-operator~1.0.36
https://charts.stderr.at/helper-status-checker~4.0.0
https://charts.stderr.at/tpl~1.0.31

It is best used with a full GitOps approach such as Argo CD does. For example, https://github.com/tjungbauer/openshift-clusterconfig-gitops

However, for the first instance, a simple shell script is used: https://github.com/tjungbauer/openshift-clusterconfig-gitops/blob/main/init_GitOps.sh This first instance typically deploys the Operator itself as well. Thus the dependency on helper-operator subchart. Any further instance does not need to deploy the Operator and can simply configure the new Argo CD instance.

Maintainers

NameEmailUrl
tjungbauer[email protected]https://blog.stderr.at/

Sources

Source:

Source code: https://github.com/tjungbauer/helm-charts/tree/main/charts/openshift-gitops

Parameters

Verify the sub-charts for additional settings:

Values

namespace

KeyTypeDefaultDescription
gitopsinstances.gitops_application.additionalAnnotationsobject{}Additional labels to add to the Keycloak instance as key: value pairs.
gitopsinstances.gitops_application.additionalLabelsobject{}Additional labels to add to the Keycloak instance as key: value pairs.

Other Values

KeyTypeDefaultDescription
gitopsinstances.gitops_applicationobject`{"additionalAnnotations":{},"additionalLabels":{},"appset":{"cpu_limits":"2","cpu_requests":"250m","memory_limits":"1Gi","memory_requests":"512Mi"},"argo_serviceaccount":"openshift-gitops-app-controller","clusterAdmin":"disabled","controller":{"cpu_limits":"2","cpu_requests":"250m","env":[],"memory_limits":"2Gi","memory_requests":"1Gi","processors":{},"sharding":{"clustersPerShard":"","dynamicScalingEnabled":false,"enabled":false,"maxShards":"","minShards":"","replicas":""}},"custom_resourceHealthChecks":"- check:\n hs = {}\n hs.status = "Progressing"\n hs.message = "Progressing ClusterLogging"\n if obj.status ~= nil and obj.status.conditions ~= nil then\n for i, condition in ipairs(obj.status.conditions) do\n if condition.type == "Ready" then\n hs.status = "Healthy"\n hs.message = "ClusterLogging is ready"\n end\n end\n return hs\n end\n return hs\n group: logging.openshift.io\n kind: ClusterLogging","default_resourceHealthChecks":true,"enabled":true,"extraConfig":{},"generic_config":{"applicationInstanceLabelKey":"argocd.argoproj.io/gitops-application","disableAdmin":true,"kustomizeBuildOptions":"--enable-helm","resourceTrackingMethod":"annotation"},"global_project":{"clusterResourceBlacklist":[{"group":"","kind":""}],"description":"Global Configuration","enabled":false,"namespaceResourceBlacklist":[{"group":"","kind":"ResourceQuota"},{"group":"","kind":"NetworkPolicy"},{"group":"","kind":"Namespace"}]},"ha":{"cpu_limits":"500m","cpu_requests":"250m","enabled":false,"memory_limits":"256Mi","memory_requests":"128Mi"},"imageUpdater":{"enabled":false,"env":[],"resources":{}},"namespace":"gitops-application","nodeSelector":{},"oidcConfig":{},"rbac":{"defaultRole":"role:none","policy":"# Access Control\ng, system:cluster-admins, role:admin\ng, cluster-admin, role:admin\np, role:none, applications, get, /, deny\np, role:none, certificates, get, *, deny\np, role:none, clusters, get, *, deny\np, role:none, repositories, get, *, deny\np, role:none, projects, get, *, deny\np, role:none, accounts, get, *, deny\np, role:none, gpgkeys, get, , deny","scopes":"[groups]"},"redis":{"cpu_limits":"500m","cpu_requests":"250m","memory_limits":"256Mi","memory_requests":"128Mi"},"repo":{"additionalSidecars":[{"command":"/var/run/argocd/argocd-cmp-server","configMapName":"post-render","configMapPath":"plugin.yaml","enabled":false,"env":[{"name":"APP_ENV","value":"prod"}],"image":"quay.io/tjungbau/gitops-tools:latest","name":"post-render","resources":{}}],"additional_env":[],"additional_trusted_ca":null,"cpu_limits":"1","cpu_requests":"250m","memory_limits":"1Gi","memory_requests":"256Mi","volumeMounts":[],"volumes":[]},"resourceExclusions":"# resources to be excluded\n- apiGroups:\n - ""\n - discovery.k8s.io\n kinds:\n - Endpoints\n - EndpointSlice\n- apiGroups:\n - apiregistration.k8s.io\n kinds:\n - APIService\n- apiGroups:\n - coordination.k8s.io\n kinds:\n - Lease\n- apiGroups:\n - authentication.k8s.io\n - authorization.k8s.io\n kinds:\n - SelfSubjectReview\n - TokenReview\n - LocalSubjectAccessReview\n - SelfSubjectAccessReview\n - SelfSubjectRulesReview\n - SubjectAccessReview\n- apiGroups:\n - certificates.k8s.io\n kinds:\n - CertificateSigningRequest\n- apiGroups:\n - cert-manager.io\n kinds:\n - CertificateRequest\n- apiGroups:\n - cilium.io\n kinds:\n - CiliumIdentity\n - CiliumEndpoint\n - CiliumEndpointSlice\n- apiGroups:\n - kyverno.io\n - reports.kyverno.io\n - wgpolicyk8s.io\n kinds:\n - PolicyReport\n - ClusterPolicyReport\n - EphemeralReport\n - ClusterEphemeralReport\n - AdmissionReport\n - ClusterAdmissionReport\n - BackgroundScanReport\n - ClusterBackgroundScanReport\n - UpdateRequest\n- apiGroups:\n - tekton.dev\n clusters:\n - ''\n kinds:\n - TaskRun\n - PipelineRun\n- apiGroups:\n - compliance.openshift.io\n kinds:\n - ComplianceCheckResult\n - ComplianceRemediation","server":{"cpu_limits":"500m","cpu_requests":"125m","host":"gitops.apps.prod.ocp.cluster","logLevel":"info","memory_limits":"256Mi","memory_requests":"128Mi","replicas":1,"route":{"enabled":true,"tls":{"caCertificate":"-----BEGIN CERTIFICATE-----\ncaCertificate\n-----END CERTIFICATE-----","certificate":"-----BEGIN CERTIFICATE-----\nCertificate\n-----END CERTIFICATE-----","destinationCACertificate":"-----BEGIN CERTIFICATE-----\ndestination CS Certificate\n-----END CERTIFICATE-----","enabled":false,"insecureEdgeTerminationPolicy":"Redirect","key":"-----BEGIN PRIVATE KEY -----\nkey\n-----END PRIVATE KEY -----","termination":"edge"}}},"sourceNamespaces":{"enabled":false,"observedNamespaces":["app1","app2"]},"sso":{"dex":{"cpu_limits":"500m","cpu_requests":"250m","enabled":true,"memory_limits":"256Mi","memory_requests":"128Mi","openShiftOAuth":true},"enabled":true,"keycloak":{"claims":[],"enabled":false,"host":"","image":"","rootCA":"","verifyTLS":false,"version":""},"provider":"dex"},"syncwave":10,"tolerations":{}}`
gitopsinstances.gitops_application.appset.cpu_limitsstring2CPU Limits for the ApplicationSet controller.
gitopsinstances.gitops_application.appset.cpu_requestsstring250mCPU Requests for the ApplicationSet controller.
gitopsinstances.gitops_application.appset.memory_limitsstring1GiMemory Limits for the ApplicationSet controller.
gitopsinstances.gitops_application.appset.memory_requestsstring512MiMemory Requests for the ApplicationSet controller.
gitopsinstances.gitops_application.argo_serviceaccountstringopenshift-gitops-app-controllerName of the service account the main argo CD instance is running.
gitopsinstances.gitops_application.clusterAdminstringdisabledEnable cluster-admin Rolebinding. Usually only required for the main Argo CD instance.
gitopsinstances.gitops_application.controllerobject{"cpu_limits":"2","cpu_requests":"250m","env":[],"memory_limits":"2Gi","memory_requests":"1Gi","processors":{},"sharding":{"clustersPerShard":"","dynamicScalingEnabled":false,"enabled":false,"maxShards":"","minShards":"","replicas":""}}Settings for the Controller (Applications) This can set limits and requests
gitopsinstances.gitops_application.controller.cpu_limitsstring2CPU Limits for the controller.
gitopsinstances.gitops_application.controller.cpu_requestsstring250mCPU Requests for the controller.
gitopsinstances.gitops_application.controller.envlist[]Additional environment variables for the controller. Each entry must have 'name' and either 'value' or 'valueFrom'. env: - name: ARGOCD_CONTROLLER_SHARDING_ALGORITHM value: round-robin
gitopsinstances.gitops_application.controller.memory_limitsstring2GiMemory Limits for the controller.
gitopsinstances.gitops_application.controller.memory_requestsstring1GiMemory Requests for the controller.
gitopsinstances.gitops_application.controller.processorsobject{}Application controller processors on the Argo CD CR. Supported settings are: status, operation. status: Status is the number of application status processors. operation: Operation is the number of application operation processors. For example: processors: status: 50 operation: 25
gitopsinstances.gitops_application.controller.shardingobjectemptySharding settings for the controller.
gitopsinstances.gitops_application.controller.sharding.clustersPerShardstringemptyClustersPerShard defines the maximum number of clusters managed by each argocd shard
gitopsinstances.gitops_application.controller.sharding.dynamicScalingEnabledboolfalseDynamicScalingEnabled defines whether the number of shards should be dynamically scaled based on the number of clusters.
gitopsinstances.gitops_application.controller.sharding.enabledboolfalseEnabled defines whether sharding should be enabled on the Application Controller component.
gitopsinstances.gitops_application.controller.sharding.maxShardsstringemptyMaxShards defines the maximum number of shards at any given point
gitopsinstances.gitops_application.controller.sharding.minShardsstringemptyMinShards defines the minimum number of shards at any given point
gitopsinstances.gitops_application.controller.sharding.replicasstringemptyReplicas defines the number of replicas of the Application Controller component
gitopsinstances.gitops_application.custom_resourceHealthChecksstringemptyDefault custom health checks. This must be LUA format so Argo can read it.
gitopsinstances.gitops_application.default_resourceHealthChecksboolfalseEnable default health checks. This will create some default health checks I usually add. * ClusterLogging, * Application (Argo CD), * Lokistack, * Subcription, * Central (ACS), InstallPlan
gitopsinstances.gitops_application.enabledboolfalseCreate the instance or not.
gitopsinstances.gitops_application.extraConfigobjectemptyAllow extra configuration for the Argo CD instance.
gitopsinstances.gitops_application.generic_config.disableAdminbooltrueDisable the first administrator user. This can be done if SSO with, for example, OpenShift is configured.
gitopsinstances.gitops_application.global_project.clusterResourceBlacklistlist[{"group":"*","kind":"*"}]Cluster Resources Backlist ... these are not allowed.
gitopsinstances.gitops_application.global_project.descriptionstring"Global Configuration"Description of the Global Project
gitopsinstances.gitops_application.global_project.enabledboolfalseGlobal Project enabled
gitopsinstances.gitops_application.global_project.namespaceResourceBlacklistlist[{"group":"","kind":"ResourceQuota"},{"group":"","kind":"NetworkPolicy"},{"group":"","kind":"Namespace"}]Namespace Resources Blacklist ... these are not allowed
gitopsinstances.gitops_application.ha.cpu_limitsstring500mCPU Limits for the HA.
gitopsinstances.gitops_application.ha.cpu_requestsstring250mCPU Requests for the HA.
gitopsinstances.gitops_application.ha.enabledboolfalseEnable HA for Argo CD
gitopsinstances.gitops_application.ha.memory_limitsstring256MiMemory Limits for the HA.
gitopsinstances.gitops_application.ha.memory_requestsstring128MiMemory Requests for the HA.
gitopsinstances.gitops_application.imageUpdaterobject{"enabled":false,"env":[],"resources":{}}Argo CD Image Updater controller for this instance (OpenShift GitOps 1.21+).
gitopsinstances.gitops_application.imageUpdater.enabledboolfalseDeplo

Deploy openshift-gitops with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has openshift-gitops 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 chartopenshift-gitops is pinned at v1.1.18 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