Skip to content
This repository has been archived by the owner on Nov 1, 2022. It is now read-only.

Commit

Permalink
Rename '--git-time-out' to '--git-timeout'
Browse files Browse the repository at this point in the history
  • Loading branch information
Hidde Beydals committed Oct 4, 2018
1 parent c6c6fe8 commit 5978219
Show file tree
Hide file tree
Showing 9 changed files with 18 additions and 18 deletions.
4 changes: 2 additions & 2 deletions chart/flux/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ The following tables lists the configurable parameters of the Weave Flux chart a
| `git.label` | Label to keep track of sync progress, used to tag the Git branch | `flux-sync`
| `git.ciSkip` | Append "[ci skip]" to commit messages so that CI will skip builds | `false`
| `git.pollInterval` | Period at which to poll git repo for new commits | `5m`
| `git.timeOut` | Duration after which git operations time out | `20s`
| `git.timeout` | Duration after which git operations timeout | `20s`
| `git.secretName` | Kubernetes secret with the SSH private key | None
| `ssh.known_hosts` | The contents of an SSH `known_hosts` file, if you need to supply host key(s) | None
| `registry.cacheExpiry` | Duration to keep cached image info in memcached | `1h`
Expand All @@ -209,7 +209,7 @@ The following tables lists the configurable parameters of the Weave Flux chart a
| `helmOperator.git.branch` | Branch of git repo to use for Helm charts | `master`
| `helmOperator.git.chartsPath` | Path within git repo to locate Helm charts (relative path) | `charts`
| `helmOperator.git.pollInterval` | Period at which to poll git repo for new commits | `git.pollInterval`
| `helmOperator.git.timeOut` | Duration after which git operations time out | `git.timeOut`
| `helmOperator.git.timeout` | Duration after which git operations timeout | `git.timeout`
| `helmOperator.git.secretName` | Kubernetes secret with the SSH private key | None
| `helmOperator.logReleaseDiffs` | Helm operator should log the diff when a chart release diverges (possibly insecure) | `false`
| `helmOperator.tillerNamespace` | Namespace in which the Tiller server can be found | `kube-system`
Expand Down
2 changes: 1 addition & 1 deletion chart/flux/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ spec:
- --git-email={{ .Values.git.email }}
- --git-set-author={{ .Values.git.setAuthor }}
- --git-poll-interval={{ .Values.git.pollInterval }}
- --git-time-out={{ .Values.git.timeOut }}
- --git-timeout={{ .Values.git.timeout }}
- --sync-interval={{ .Values.git.pollInterval }}
- --git-ci-skip={{ .Values.git.ciSkip }}
{{- if .Values.git.label }}
Expand Down
4 changes: 2 additions & 2 deletions chart/flux/templates/helm-operator-deployment.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{{- $gitURL := default .Values.git.url .Values.helmOperator.git.url }}
{{- $gitBranch := default .Values.git.branch .Values.helmOperator.git.branch }}
{{- $gitPollInterval := default .Values.git.pollInterval .Values.helmOperator.git.pollInterval }}
{{- $gitTimeOut := default .Values.git.timeOut .Values.helmOperator.git.timeOut }}
{{- $gitTimeout := default .Values.git.timeout .Values.helmOperator.git.timeout }}
{{- if .Values.helmOperator.create -}}
apiVersion: apps/v1beta2
kind: Deployment
Expand Down Expand Up @@ -80,7 +80,7 @@ spec:
- --git-url={{ $gitURL }}
- --git-branch={{ $gitBranch }}
- --git-poll-interval={{ $gitPollInterval }}
- --git-time-out={{ $gitTimeOut }}
- --git-timeout={{ $gitTimeout }}
- --git-charts-path={{ .Values.helmOperator.git.chartsPath }}
- --charts-sync-interval={{ .Values.helmOperator.chartsSyncInterval }}
- --charts-sync-timeout={{ .Values.helmOperator.chartsSyncTimeout }}
Expand Down
6 changes: 3 additions & 3 deletions chart/flux/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ helmOperator:
branch: ""
chartsPath: "charts"
pollInterval: ""
timeOut: ""
timeout: ""
# generate a SSH key named identity: ssh-keygen -q -N "" -f ./identity
# create a Kubernetes secret: kubectl -n flux create secret generic helm-ssh --from-file=./identity
# delete the private key: rm ./identity
Expand Down Expand Up @@ -95,8 +95,8 @@ git:
ciSkip: false
# Period at which to poll git repo for new commits
pollInterval: "5m"
# Duration after which git operations time out
timeOut: "20s"
# Duration after which git operations timeout
timeout: "20s"
# generate a SSH key named identity: ssh-keygen -q -N "" -f ./identity
# create a Kubernetes secret: kubectl -n flux create secret generic flux-ssh --from-file=./identity
# delete the private key: rm ./identity
Expand Down
4 changes: 2 additions & 2 deletions cmd/fluxd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ func main() {
gitSkipMessage = fs.String("git-ci-skip-message", "", "additional text for commit messages, useful for skipping builds in CI. Use this to supply specific text, or set --git-ci-skip")

gitPollInterval = fs.Duration("git-poll-interval", 5*time.Minute, "period at which to poll git repo for new commits")
gitTimeOut = fs.Duration("git-time-out", 20*time.Second, "duration after which git operations time out")
gitTimeout = fs.Duration("git-timeout", 20*time.Second, "duration after which git operations timeout")
// syncing
syncInterval = fs.Duration("sync-interval", 5*time.Minute, "apply config in git to cluster at least this often, even if there are no new commits")
// registry
Expand Down Expand Up @@ -370,7 +370,7 @@ func main() {
SkipMessage: *gitSkipMessage,
}

repo := git.NewRepo(gitRemote, git.PollInterval(*gitPollInterval), git.TimeOut(*gitTimeOut))
repo := git.NewRepo(gitRemote, git.PollInterval(*gitPollInterval), git.Timeout(*gitTimeout))
{
shutdownWg.Add(1)
go func() {
Expand Down
6 changes: 3 additions & 3 deletions cmd/helm-operator/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ var (
gitBranch *string
gitChartsPath *string
gitPollInterval *time.Duration
gitTimeOut *time.Duration
gitTimeout *time.Duration

queueWorkerCount *int

Expand Down Expand Up @@ -108,7 +108,7 @@ func init() {
gitBranch = fs.String("git-branch", "master", "branch of git repo")
gitChartsPath = fs.String("git-charts-path", defaultGitChartsPath, "path within git repo to locate Helm Charts (relative path)")
gitPollInterval = fs.Duration("git-poll-interval", 5*time.Minute, "period on which to poll for changes to the git repo")
gitTimeOut = fs.Duration("git-time-out", 20*time.Second, "duration after which git operations time out")
gitTimeout = fs.Duration("git-timeout", 20*time.Second, "duration after which git operations timeout")

queueWorkerCount = fs.Int("queue-worker-count", 2, "Number of workers to process queue with Chart release jobs. Two by default")
}
Expand Down Expand Up @@ -191,7 +191,7 @@ func main() {
go statusUpdater.Loop(shutdown, log.With(logger, "component", "annotator"))

gitRemote := git.Remote{URL: *gitURL}
repo := git.NewRepo(gitRemote, git.PollInterval(*gitPollInterval), git.TimeOut(*gitTimeOut), git.ReadOnly)
repo := git.NewRepo(gitRemote, git.PollInterval(*gitPollInterval), git.Timeout(*gitTimeout), git.ReadOnly)

// Chart releases sync due to Custom Resources changes -------------------------------
{
Expand Down
6 changes: 3 additions & 3 deletions git/repo.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const (
defaultInterval = 5 * time.Minute
defaultTimeout = 20 * time.Second

CheckPushTag = "flux-write-check"
CheckPushTag = "flux-write-check"
)

var (
Expand Down Expand Up @@ -82,9 +82,9 @@ func (p PollInterval) apply(r *Repo) {
r.interval = time.Duration(p)
}

type TimeOut time.Duration
type Timeout time.Duration

func (t TimeOut) apply(r *Repo) {
func (t Timeout) apply(r *Repo) {
r.timeout = time.Duration(t)
}

Expand Down
2 changes: 1 addition & 1 deletion site/daemon.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ fluxd requires setup and offers customization though a multitude of flags.
|--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 | `5 minutes` | period at which to fetch any new commits from the git repo |
|--git-time-out | `20 seconds` | duration after which git operations time out |
|--git-timeout | `20 seconds` | duration after which git operations timeout |
|**syncing** | | control over how config is applied to the cluster |
|--sync-interval | `5 minutes` | apply the git config to the cluster at least this often. New commits may provoke more frequent syncs |
|**registry cache** | | (none of these need overriding, usually) |
Expand Down
2 changes: 1 addition & 1 deletion site/helm-operator.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ helm-operator requires setup and offers customization though a multitude of flag
|--git-branch | `master` | Branch of git repo to use for Kubernetes manifests|
|--git-charts-path | `charts` | Path within git repo to locate Kubernetes Charts (relative path)|
| | | **repo chart changes** (none of these need overriding, usually) |
|--git-time-out | `20 seconds` | duration after which git operations time out |
|--git-timeout | `20 seconds` | duration after which git operations timeout |
|--git-poll-interval | `5 minutes` | period at which to poll git repo for new commits|
|--chartsSyncInterval | 3*time.Minute | Interval at which to check for changed charts.|
|--chartsSyncTimeout | 1*time.Minute | Timeout when checking for changed charts.|
Expand Down

0 comments on commit 5978219

Please sign in to comment.