<commit_before># Daemon (`fluxd`)

## Summary

Flux daemon (`fluxd`, aka Flux agent) allows automation of application deployments and version control of cluster configuration.
Version controlling of cluster manifests provides reproducibility and a historical trail of events.

### Responsibilities

#### Continuous Deployment

1. Flux daemon monitors user git repo Kubernetes manifests for
   changes, which it then deploys to the cluster.

2. Flux daemon monitors container registry for running container image
   updates. Detection of an image change (running container image tag
   vs container registry image tag) triggers k8s manifest update, which
   is committed to the user git repository, then deployed to the
   Kubernetes cluster.

#### Deployment approaches
        
1. Automate vs Deautomate

   Deployment happens automatically when a new image tag is
   detected. Deautomated deployment will not proceed until
   manually released (through the CLI tool `fluxctl`).

2. Lock vs Unlock

   Deployment is pinned to a particular image tag.
   New deployment will not proceed upon triggered release.

## Setup and configuration

`fluxd` requires setup and offers customization though a multitude of flags.

| Flag                                             | Default                            | Purpose
| ------------------------------------------------ | ---------------------------------- | ---
| --listen -l                                      | `:3030`                            | listen address where /metrics and API will be served
| --listen-metrics                                 |                                    | listen address for /metrics endpoint
| --kubernetes-kubectl                             |                                    | optional, explicit path to kubectl tool
| --version                                        | false                              | output the version number and exit
| **Git repo & key etc.**
| --git-url                                        |                          | URL of git repo with Kubernetes manifests; e.g., `<EMAIL>:fluxcd/flux-get-started`
| --git-branch                                     | `master`                 | branch of git repo to use for Kubernetes manifests
| --git-ci-skip                                    | false                    | when set, fluxd will append `\n\n[ci skip]` to its commit messages
| --git-ci-skip-message                            | `""`                     | if provided, fluxd will append this to commit messages (overrides --git-ci-skip`)
| --git-path                                       |                          | path within git repo to locate Kubernetes manifests (relative path)
| --git-user                                       | `Weave Flux`             | username to use as git committer
| --git-email                                      | `<EMAIL>`    | email to use as git committer
| --git-set-author                                 | false                    | if set, the author of git commits will reflect the user who initiated the commit and will differ from the git committer
| --git-gpg-key-import                             |                          | if set, fluxd will attempt to import the gpg key(s) found on the given path
| --git-signing-key                                |                          | if set, commits made by fluxd to the user git repo will be signed with the provided GPG key.
| --git-label                                      |                          | label to keep track of sync progress; overrides both --git-sync-tag and --git-notes-ref
| --git-sync-tag                                   | `flux-sync`              | tag to use to mark sync progress for this cluster (old config, still used if --git-label is not supplied)
| --git-notes-ref                                  | `flux`                   | ref to use for keeping commit annotations in git notes
| --git-poll-interval                              | `5m`                     | period at which to fetch any new commits from the git repo
| --git-timeout                                    | `20s`                    | duration after which git operations time out
| --git-readonly                                   | `false`                  | If `true`, the git repo will be considered read-only, and Flux will not attempt to write to it. Implies -sync-state=secret
| **syncing:** control over how config is applied to the cluster
| --sync-interval                                  | `5m`                     | apply the git config to the cluster at least this often. New commits may provoke more frequent syncs<commit_msg>Fix typo in daemon reference documentation<commit_after># Daemon (`fluxd`)

## Summary

Flux daemon (`fluxd`, aka Flux agent) allows automation of application deployments and version control of cluster configuration.
Version controlling of cluster manifests provides reproducibility and a historical trail of events.

### Responsibilities

#### Continuous Deployment

1. Flux daemon monitors user git repo Kubernetes manifests for
   changes, which it then deploys to the cluster.

2. Flux daemon monitors container registry for running container image
   updates. Detection of an image change (running container image tag
   vs container registry image tag) triggers k8s manifest update, which
   is committed to the user git repository, then deployed to the
   Kubernetes cluster.

#### Deployment approaches
        
1. Automate vs Deautomate

   Deployment happens automatically when a new image tag is
   detected. Deautomated deployment will not proceed until
   manually released (through the CLI tool `fluxctl`).

2. Lock vs Unlock

   Deployment is pinned to a particular image tag.
   New deployment will not proceed upon triggered release.

## Setup and configuration

`fluxd` requires setup and offers customization though a multitude of flags.

| Flag                                             | Default                            | Purpose
| ------------------------------------------------ | ---------------------------------- | ---
| --listen -l                                      | `:3030`                            | listen address where /metrics and API will be served
| --listen-metrics                                 |                                    | listen address for /metrics endpoint
| --kubernetes-kubectl                             |                                    | optional, explicit path to kubectl tool
| --version                                        | false                              | output the version number and exit
| **Git repo & key etc.**
| --git-url                                        |                          | URL of git repo with Kubernetes manifests; e.g., `<EMAIL>:fluxcd/flux-get-started`
| --git-branch                                     | `master`                 | branch of git repo to use for Kubernetes manifests
| --git-ci-skip                                    | false                    | when set, fluxd will append `\n\n[ci skip]` to its commit messages
| --git-ci-skip-message                            | `""`                     | if provided, fluxd will append this to commit messages (overrides --git-ci-skip`)
| --git-path                                       |                          | path within git repo to locate Kubernetes manifests (relative path)
| --git-user                                       | `Weave Flux`             | username to use as git committer
| --git-email                                      | `<EMAIL>`    | email to use as git committer
| --git-set-author                                 | false                    | if set, the author of git commits will reflect the user who initiated the commit and will differ from the git committer
| --git-gpg-key-import                             |                          | if set, fluxd will attempt to import the gpg key(s) found on the given path
| --git-signing-key                                |                          | if set, commits made by fluxd to the user git repo will be signed with the provided GPG key.
| --git-label                                      |                          | label to keep track of sync progress; overrides both --git-sync-tag and --git-notes-ref
| --git-sync-tag                                   | `flux-sync`              | tag to use to mark sync progress for this cluster (old config, still used if --git-label is not supplied)
| --git-notes-ref                                  | `flux`                   | ref to use for keeping commit annotations in git notes
| --git-poll-interval                              | `5m`                     | period at which to fetch any new commits from the git repo
| --git-timeout                                    | `20s`                    | duration after which git operations time out
| --git-readonly                                   | `false`                  | If `true`, the git repo will be considered read-only, and Flux will not attempt to write to it. Implies --sync-state=secret
| **syncing:** control over how config is applied to the cluster
| --sync-interval                                  | `5m`                     | apply the git config to the cluster at least this often. New commits may provoke more frequent syncs
{'fraction_non_alphanumeric': 0.08196195768326565, 'fraction_numerical': 0.002778371446890361, 'mean_word_length': 1.311434922203013, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 70, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3362849', 'n_tokens_mistral': 2072, 'n_tokens_neox': 1933, 'n_words': 916}