github.com/argoproj/argo-cd/v3@v3.2.1/docs/operator-manual/argocd-cm.yaml (about)

     1  apiVersion: v1
     2  kind: ConfigMap
     3  metadata:
     4    name: argocd-cm
     5    namespace: argocd
     6    labels:
     7      app.kubernetes.io/name: argocd-cm
     8      app.kubernetes.io/part-of: argocd
     9  data:
    10    # Argo CD's externally facing base URL (optional). Required when configuring SSO
    11    url: https://argo-cd-demo.argoproj.io
    12  
    13    # Additional externally facing base URLs (optional)
    14    additionalUrls: |
    15      - https://argo-cd-demo2.argoproj.io
    16  
    17    # Enables application status badge feature
    18    statusbadge.enabled: "true"
    19  
    20    # Override the Argo CD hostname root URL for both the project and the application status badges.
    21    # Here is an example of the application status badge for the app `myapp` to see what is replaced.
    22    #    <statusbadge.url>api/badge?name=myapp&revision=true
    23    # Provide custom URL to override. You must include the trailing forward slash:
    24    statusbadge.url: "https://cd-status.apps.argoproj.io/"
    25  
    26    # Enables anonymous user access. The anonymous users get default role permissions specified argocd-rbac-cm.yaml.
    27    users.anonymous.enabled: "true"
    28    # Specifies token expiration duration
    29    users.session.duration: "24h"
    30  
    31    # Specifies regex expression for password
    32    passwordPattern: "^.{8,32}$"
    33  
    34    # Enables google analytics tracking is specified
    35    ga.trackingid: "UA-12345-1"
    36    # Unless set to 'false' then user ids are hashed before sending to google analytics
    37    ga.anonymizeusers: "false"
    38  
    39    # the URL for getting chat help, this will typically be your Slack channel for support
    40    help.chatUrl: "https://mycorp.slack.com/argo-cd"
    41    # the text for getting chat help, defaults to "Chat now!"
    42    help.chatText: "Chat now!"
    43    # The URLs to download additional ArgoCD binaries (besides the Linux with current platform binary included by default)
    44    # for different OS architectures. If provided, additional download buttons will be displayed on the help page.
    45    help.download.linux-amd64: "path-or-url-to-download"
    46    help.download.linux-arm64: "path-or-url-to-download"
    47    help.download.linux-ppc64le: "path-or-url-to-download"
    48    help.download.linux-s390x: "path-or-url-to-download"
    49    help.download.darwin-amd64: "path-or-url-to-download"
    50    help.download.darwin-arm64: "path-or-url-to-download"
    51    help.download.windows-amd64: "path-or-url-to-download"
    52  
    53    # A dex connector configuration (optional). See SSO configuration documentation:
    54    # https://github.com/argoproj/argo-cd/blob/master/docs/operator-manual/user-management/index.md#sso
    55    # https://dexidp.io/docs/connectors/
    56    dex.config: |
    57      connectors:
    58        # GitHub example
    59        - type: github
    60          id: github
    61          name: GitHub
    62          config:
    63            clientID: aabbccddeeff00112233
    64            clientSecret: $dex.github.clientSecret
    65            orgs:
    66            - name: your-github-org
    67              teams:
    68              - red-team
    69      # It is possible to provide custom static client for dex if you want to reuse it
    70      # with other services
    71      # staticClients:
    72      # - id: argo-workflow
    73      #   name: Argo Workflow
    74      #   redirectURIs:
    75      #     - https://argo/oauth2/callback
    76      #   secret: $secretReference
    77  
    78    # OIDC configuration as an alternative to dex (optional).
    79    oidc.config: |
    80      name: Okta
    81      issuer: https://dev-123456.oktapreview.com
    82      clientID: aaaabbbbccccddddeee
    83      clientSecret: $oidc.okta.clientSecret
    84      # Optional set of OIDC scopes to request. If omitted, defaults to: ["openid", "profile", "email", "groups"]
    85      requestedScopes: ["openid", "profile", "email"]
    86      # Optional set of OIDC claims to request on the ID token.
    87      requestedIDTokenClaims: {"groups": {"essential": true}}
    88  
    89    # Configuration to customize resource behavior (optional) can be configured via splitted sub keys.
    90    # Keys are in the form: resource.customizations.ignoreDifferences.<group_kind>, resource.customizations.health.<group_kind>
    91    # resource.customizations.actions.<group_kind>, resource.customizations.knownTypeFields.<group_kind>
    92    # resource.customizations.ignoreResourceUpdates.<group_kind>
    93    resource.customizations.ignoreDifferences.admissionregistration.k8s.io_MutatingWebhookConfiguration: |
    94      jsonPointers:
    95      - /webhooks/0/clientConfig/caBundle
    96      jqPathExpressions:
    97      - .webhooks[0].clientConfig.caBundle
    98      managedFieldsManagers:
    99      - kube-controller-manager
   100  
   101    # Configuration to define customizations ignoring differences between live and desired states for
   102    # all resources (GK).
   103    resource.customizations.ignoreDifferences.all: |
   104      managedFieldsManagers:
   105      - kube-controller-manager
   106      jsonPointers:
   107      - /spec/replicas
   108  
   109    # Enable resource.customizations.ignoreResourceUpdates rules. If "false," those rules are not applied, and all updates
   110    # to resources are applied to the cluster cache. Default is true.
   111    resource.ignoreResourceUpdatesEnabled: "true"
   112  
   113    # Configuration to define customizations ignoring differences during watched resource updates to skip application reconciles.
   114    resource.customizations.ignoreResourceUpdates.all: |
   115      jsonPointers:
   116      - /metadata/resourceVersion
   117  
   118    # Configuration to define customizations ignoring differences during watched resource updates can be configured via splitted sub key.
   119    resource.customizations.ignoreResourceUpdates.argoproj.io_Application: |
   120      jsonPointers:
   121      - /status
   122  
   123    # jsonPointers and jqPathExpressions can be specified.
   124    resource.customizations.ignoreResourceUpdates.autoscaling_HorizontalPodAutoscaler: |
   125      jqPathExpressions:
   126      - '.metadata.annotations."autoscaling.alpha.kubernetes.io/behavior"'
   127      - '.metadata.annotations."autoscaling.alpha.kubernetes.io/conditions"'
   128      - '.metadata.annotations."autoscaling.alpha.kubernetes.io/metrics"'
   129      - '.metadata.annotations."autoscaling.alpha.kubernetes.io/current-metrics"'
   130      jsonPointers:
   131      - /metadata/annotations/autoscaling.alpha.kubernetes.io~1behavior
   132      - /metadata/annotations/autoscaling.alpha.kubernetes.io~1conditions
   133      - /metadata/annotations/autoscaling.alpha.kubernetes.io~1metrics
   134      - /metadata/annotations/autoscaling.alpha.kubernetes.io~1current-metrics
   135  
   136    resource.customizations.health.certmanager.k8s.io_Certificate: |
   137      hs = {}
   138      if obj.status ~= nil then
   139        if obj.status.conditions ~= nil then
   140          for i, condition in ipairs(obj.status.conditions) do
   141            if condition.type == "Ready" and condition.status == "False" then
   142              hs.status = "Degraded"
   143              hs.message = condition.message
   144              return hs
   145            end
   146            if condition.type == "Ready" and condition.status == "True" then
   147              hs.status = "Healthy"
   148              hs.message = condition.message
   149              return hs
   150            end
   151          end
   152        end
   153      end
   154      hs.status = "Progressing"
   155      hs.message = "Waiting for certificate"
   156      return hs
   157  
   158    resource.customizations.health.cert-manager.io_Certificate: |
   159      hs = {}
   160      if obj.status ~= nil then
   161        if obj.status.conditions ~= nil then
   162          for i, condition in ipairs(obj.status.conditions) do
   163            if condition.type == "Ready" and condition.status == "False" then
   164              hs.status = "Degraded"
   165              hs.message = condition.message
   166              return hs
   167            end
   168            if condition.type == "Ready" and condition.status == "True" then
   169              hs.status = "Healthy"
   170              hs.message = condition.message
   171              return hs
   172            end
   173          end
   174        end
   175      end
   176      hs.status = "Progressing"
   177      hs.message = "Waiting for certificate"
   178      return hs
   179  
   180    # List of Lua Scripts to introduce custom actions
   181    resource.customizations.actions.apps_Deployment: |
   182      # Lua Script to indicate which custom actions are available on the resource
   183      discovery.lua: |
   184        actions = {}
   185        actions["restart"] = {}
   186        return actions
   187      definitions:
   188        - name: restart
   189          # Lua Script to modify the obj
   190          action.lua: |
   191            local os = require("os")
   192            if obj.spec.template.metadata == nil then
   193                obj.spec.template.metadata = {}
   194            end
   195            if obj.spec.template.metadata.annotations == nil then
   196                obj.spec.template.metadata.annotations = {}
   197            end
   198            obj.spec.template.metadata.annotations["kubectl.kubernetes.io/restartedAt"] = os.date("!%Y-%m-%dT%XZ")
   199            return obj
   200  
   201    # Configuration to completely ignore entire classes of resource group/kinds (optional).
   202    # Excluding high-volume resources improves performance and memory usage, and reduces load and
   203    # bandwidth to the Kubernetes API server.
   204    # These are globs, so a "*" will match all values.
   205    # If you omit groups/kinds/clusters then they will match all groups/kind/clusters.
   206    # NOTE: events.k8s.io and metrics.k8s.io are excluded by default
   207    resource.exclusions: |
   208      - apiGroups:
   209        - repositories.stash.appscode.com
   210        kinds:
   211        - Snapshot
   212        clusters:
   213        - "*.local"
   214  
   215    # By default all resource group/kinds are included. The resource.inclusions setting allows customizing
   216    # list of included group/kinds.
   217    resource.inclusions: |
   218      - apiGroups:
   219        - repositories.stash.appscode.com
   220        kinds:
   221        - Snapshot
   222        clusters:
   223        - "*.local"
   224  
   225    # An optional comma-separated list of annotation keys to mask in UI/CLI on secrets
   226    resource.sensitive.mask.annotations: openshift.io/token-secret.value,api-key
   227  
   228    # An optional comma-separated list of metadata.labels to observe in the UI.
   229    resource.customLabels: tier
   230  
   231    # An optional comma-separated list of metadata.labels keys to add to Kubernetes events generated for Applications.
   232    # The keys are compared against the Application and its AppProject. If matched,
   233    # the corresponding labels are added to the generated event.
   234    # In case of a conflict between labels on the Application and AppProject,
   235    # the Application label values are prioritized and added to the event. Supports wildcards.
   236    resource.includeEventLabelKeys: team,env*
   237    # An optional comma-separated list of metadata.labels keys to exclude from Kubernetes events generated for Applications. Supports wildcards.
   238    resource.excludeEventLabelKeys: environment,bu
   239  
   240    resource.compareoptions: |
   241      # if ignoreAggregatedRoles set to true then differences caused by aggregated roles in RBAC resources are ignored.
   242      ignoreAggregatedRoles: true
   243  
   244      # disables status field diffing in specified resource types
   245      # 'crd' - CustomResourceDefinitions 
   246      # 'all' - all resources (default)
   247      # 'none' - disabled
   248      ignoreResourceStatusField: all
   249  
   250    # configuration to instruct controller to only watch for resources that it has permissions to list
   251    # can be either empty, "normal" or "strict". By default, it is empty i.e. disabled.
   252    resource.respectRBAC: "normal"
   253  
   254    # A set of settings that allow enabling or disabling the config management tool.
   255    # If unset, each defaults to "true".
   256    kustomize.enabled: "true"
   257    jsonnet.enabled: "true"
   258    helm.enabled: "true"
   259  
   260    # Build options/parameters to use with `kustomize build` (optional)
   261    kustomize.buildOptions: --load_restrictor none
   262  
   263    # Per-version build options and binary paths
   264    kustomize.path.v3.9.1: /custom-tools/kustomize_3_9
   265    kustomize.buildOptions.v3.9.1: --enable_kyaml true
   266  
   267    # Additional Kustomize versions and corresponding binary paths (deprecated)
   268    kustomize.version.v3.5.1: /custom-tools/kustomize_3_5_1
   269    kustomize.version.v3.5.4: /custom-tools/kustomize_3_5_4
   270  
   271    # Comma delimited list of additional custom remote values file schemes (http are https are allowed by default).
   272    # Change to empty value if you want to disable remote values files altogether.
   273    helm.valuesFileSchemes: http, https
   274  
   275    # The metadata.label key name where Argo CD injects the app name as a tracking label (optional).
   276    # Tracking labels are used to determine which resources need to be deleted when pruning.
   277    # If omitted, Argo CD injects the app name into the label: 'app.kubernetes.io/instance'
   278    application.instanceLabelKey: mycompany.com/appname
   279  
   280    # An optional comma-separated list of node labels to propagate to the application pod view.
   281    application.allowedNodeLabels: topology.kubernetes.io/zone,node.kubernetes.io/instance-type
   282  
   283    # You can change the resource tracking method Argo CD uses by changing the
   284    # setting application.resourceTrackingMethod to the desired method.
   285    # The following methods are available:
   286    # - annotation       : Uses an annotation with additional metadata for tracking instead of the label
   287    # - annotation+label : Also uses an annotation for tracking, but additionally labels the resource with the application name
   288    # - label            : Uses the application.instanceLabelKey label for tracking
   289    application.resourceTrackingMethod: annotation
   290  
   291    # Optional installation id. Allows to have multiple installations of Argo CD in the same cluster.
   292    installationID: "my-unique-id"
   293  
   294    # disables admin user. Admin is enabled by default
   295    admin.enabled: "false"
   296    # add an additional local user with apiKey and login capabilities
   297    #   apiKey - allows generating API keys
   298    #   login - allows to login using UI
   299    accounts.alice: apiKey, login
   300    # disables user. User is enabled by default
   301    accounts.alice.enabled: "false"
   302  
   303    # The location of optional user-defined CSS that is loaded at runtime.
   304    # Local CSS Files:
   305    # - If the supplied path is to a file mounted on the argocd-server container, that file should be mounted
   306    #   within a subdirectory of the existing "/shared/app" directory (e.g. "/shared/app/custom").  Otherwise,
   307    #   the file will likely fail to be imported by the browser with an "incorrect MIME type" error.
   308    # - The path should be specified relative to the "/shared/app" directory; not as an absolute path.
   309    # Remote CSS Files:
   310    # - Files may also be loaded from remote locations via fully qualified URLs.
   311    ui.cssurl: "./custom/my-styles.css"
   312  
   313    # An optional user-defined banner message that's displayed at the top of every UI page.
   314    # Every time this is updated, it will clear a user's localStorage telling the UI to hide the banner forever.
   315    ui.bannercontent: "Hello there!"
   316    # Optional link for banner. If set, the entire banner text will become a link.
   317    # You can have bannercontent without a bannerurl, but not the other way around.
   318    ui.bannerurl: "https://argoproj.github.io"
   319    # Uncomment to make the banner not show the close buttons, thereby making the banner permanent.
   320    # Because it is permanent, only one line of text is available to not take up too much real estate in the UI,
   321    # so it is recommended that the length of the bannercontent text is kept reasonably short. Note that you can
   322    # have either a permanent banner or a regular closeable banner, and NOT both. eg. A user can't dismiss a
   323    # notification message (closeable) banner, to then immediately see a permanent banner.
   324    # ui.bannerpermanent: "true"
   325    # An option to specify the position of the banner, either the top or bottom of the page, or both. The valid values
   326    # are: "top", "bottom" and "both".  The default (if the option is not provided), is "top". If "both" is specified, then
   327    # the content appears both at the top and the bottom of the page. Uncomment the following line to make the banner appear
   328    # at the bottom of the page. Change the value as needed.
   329    # ui.bannerposition: "bottom"
   330  
   331    # Application reconciliation timeout is the amount of time spent before Argo tries to discover if a new manifests version got
   332    # published to the repository. Reconciliation by timeout is disabled if timeout is set to 0. Two minutes by default with additional jitter.
   333    # For the argocd-repo-server this setting defines the expiration
   334    # value for cached git revisions.
   335    # When set to 0, the cache expiration value will be taken from the
   336    # --default-cache-expiration parameter, which is 24 hours by
   337    # default, unless another value is set using the
   338    # ARGOCD_DEFAULT_CACHE_EXPIRATION variable).
   339    # > Note: The argocd-repo-server deployment and the argocd-application-controller statefulset (or deployment, if
   340    # configured) must be manually restarted after changing the setting.
   341    timeout.reconciliation: 120s
   342  
   343    # With a large number of applications, the periodic refresh for each application can cause a spike in the refresh queue
   344    # and can cause a spike in the repo-server component. To avoid this, you can set a jitter to the sync timeout, which will
   345    # spread out the refreshes and give time to the repo-server to catch up. The jitter is the maximum duration that can be
   346    # added to the sync timeout. So, if the sync timeout is 3 minutes and the jitter is 1 minute, then the actual timeout will
   347    # be between 3 and 4 minutes. Disabled when the value is 0, defaults to 1 minute.
   348    timeout.reconciliation.jitter: 60s
   349  
   350    # cluster.inClusterEnabled indicates whether to allow in-cluster server address. This is enabled by default.
   351    cluster.inClusterEnabled: "true"
   352  
   353    # The maximum number of pod logs to render in UI. If the application has more than this number of pods, the logs will not be rendered.
   354    # This is to prevent the UI from becoming unresponsive when rendering a large number of logs. Default is 10.
   355    server.maxPodLogsToRender: "10"
   356  
   357    # exec.enabled indicates whether the UI exec feature is enabled. It is disabled by default.
   358    exec.enabled: "false"
   359  
   360    # exec.shells restricts which shells are allowed for `exec`, and in which order they are attempted
   361    exec.shells: "bash,sh,powershell,cmd"
   362  
   363    # oidc.tls.insecure.skip.verify determines whether certificate verification is skipped when verifying tokens with the
   364    # configured OIDC provider (either external or the bundled Dex instance). Setting this to "true" will cause JWT
   365    # token verification to pass despite the OIDC provider having an invalid certificate. Only set to "true" if you
   366    # understand the risks.
   367    oidc.tls.insecure.skip.verify: "false"
   368  
   369    # Add Deep Links to ArgoCD UI
   370    # sample project level links
   371    project.links: |
   372      - url: https://myaudit-system.com?project={{.metadata.name}}
   373        title: Audit
   374        description: system audit logs
   375        icon.class: "fa-book"
   376    # sample application level links
   377    application.links: |
   378      # pkg.go.dev/text/template is used for evaluating url templates
   379      - url: https://mycompany.splunk.com?search={{.spec.destination.namespace}}
   380        title: Splunk
   381      # conditionally show link e.g. for specific project
   382      # github.com/expr-lang/expr is used for evaluation of conditions
   383      - url: https://mycompany.splunk.com?search={{.spec.destination.namespace}}
   384        title: Splunk
   385        if: spec.project == "default"
   386      - url: https://{{.metadata.annotations.splunkhost}}?search={{.spec.destination.namespace}}
   387        title: Splunk
   388        if: metadata.annotations.splunkhost
   389    # sample resource level links
   390    resource.links: |
   391      - url: https://mycompany.splunk.com?search={{.metadata.namespace}}
   392        title: Splunk
   393        if: kind == "Pod" || kind == "Deployment"
   394  
   395    extension.config: |
   396      extensions:
   397          # Name defines the endpoint that will be used to register
   398          # the extension route.
   399          # Mandatory field.
   400        - name: some-extension
   401          backend:
   402            # ConnectionTimeout is the maximum amount of time a dial to
   403            # the extension server will wait for a connect to complete.
   404            # Optional field. Default: 2 seconds
   405            connectionTimeout: 2s
   406  
   407            # KeepAlive specifies the interval between keep-alive probes
   408            # for an active network connection between the API server and
   409            # the extension server.
   410            # Optional field. Default: 15 seconds
   411            keepAlive: 15s
   412  
   413            # IdleConnectionTimeout is the maximum amount of time an idle
   414            # (keep-alive) connection between the API server and the extension
   415            # server will remain idle before closing itself.
   416            # Optional field. Default: 60 seconds
   417            idleConnectionTimeout: 60s
   418  
   419            # MaxIdleConnections controls the maximum number of idle (keep-alive)
   420            # connections between the API server and the extension server.
   421            # Optional field. Default: 30
   422            maxIdleConnections: 30
   423  
   424            services:
   425                # URL is the address where the extension backend must be available.
   426                # Mandatory field.
   427              - url: http://httpbin.org
   428  
   429                # Cluster if provided, will have to match the application
   430                # destination name or the destination server to have requests
   431                # properly forwarded to this service URL.
   432                # Optional field if only one service is specified.
   433                # Mandatory if multiple services are specified.
   434                cluster:
   435                  name: some-cluster
   436                  server: https://some-cluster
   437    # The maximum size of the payload that can be sent to the webhook server.
   438    webhook.maxPayloadSizeMB: "50"
   439  
   440    # application.sync.impersonation.enabled enables application sync to use a custom service account, via impersonation. This allows decoupling sync from control-plane service account.
   441    application.sync.impersonation.enabled: "false"
   442  
   443    ### SourceHydrator commit message template.
   444    # This template iterates through the fields in the `.metadata` object,
   445    # and formats them based on their type (map, array, or primitive values).
   446    # This is the default template and targets specific metadata properties
   447    sourceHydrator.commitMessageTemplate: |
   448      {{.metadata.drySha | trunc 7}}: {{ .metadata.subject }}
   449      {{- if .metadata.body }}
   450      
   451      {{ .metadata.body }}
   452      {{- end }}
   453      {{ range $ref := .metadata.references }}
   454      {{- if and $ref.commit $ref.commit.author }}
   455      Co-authored-by: {{ $ref.commit.author }}
   456      {{- end }}
   457      {{- end }}
   458      {{- if .metadata.author }}
   459      Co-authored-by: {{ .metadata.author }}
   460      {{- end }}