Skip to content

Commit c2433ea

Browse files
committed
refactor: rename argo options prior to first release
1 parent f77380a commit c2433ea

File tree

2 files changed

+23
-23
lines changed

2 files changed

+23
-23
lines changed

Diff for: README.md

+12-12
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,15 @@ image-cache-daemon [flags]
2222
### Options
2323

2424
```
25-
-h, --help help for image-cache-daemon
26-
--image stringArray Images that should be pre-fetched
27-
--node-name string The node name to pull to
28-
--pod-name string The pod name
29-
--pod-namespace string The namespace this pod is running in
30-
--pod-uid string The owning pod UID
31-
--resync-period duration How often the daemon should re-pull images from all of the sources. Set to 0 to disable. (default 15m0s)
32-
--warden-image string The image that copies a binary to pulled containers to replace the entrypoint (default "exiges/image-cache-warden:latest")
33-
--watch-cluster-workflow-templates Whether or not to watch cluster workflow templates (default true)
34-
--watch-cron-workflows Whether or not to watch cron workflows (default true)
35-
--watch-workflow-templates Whether or not to watch workflow templates (default true)
36-
```
25+
-h, --help help for image-cache-daemon
26+
--image stringArray Images that should be pre-fetched
27+
--node-name string The node name to pull to
28+
--pod-name string The pod name
29+
--pod-namespace string The namespace this pod is running in
30+
--pod-uid string The owning pod UID
31+
--resync-period duration How often the daemon should re-pull images from all of the sources. Set to 0 to disable. (default 15m0s)
32+
--warden-image string The image that copies a binary to pulled containers to replace the entrypoint (default "exiges/image-cache-warden:latest")
33+
--watch-argo-cluster-workflow-templates Whether or not to watch cluster workflow templates (default true)
34+
--watch-argo-cron-workflows Whether or not to watch cron workflows (default true)
35+
--watch-argo-workflow-templates Whether or not to watch workflow templates (default true)
36+
```

Diff for: cmd/image-cache-daemon.go

+11-11
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,11 @@ func NewImageCacheDaemonCommand() *cobra.Command {
5050
podUUID string
5151
podNamespace string
5252

53-
wardenImage string
54-
watchWorkflowTemplates bool
55-
watchClusterWorkflowTemplates bool
56-
watchCronWorkflows bool
57-
resyncPeriod time.Duration
53+
wardenImage string
54+
watchArgoWorkflowTemplates bool
55+
watchArgoClusterWorkflowTemplates bool
56+
watchArgoCronWorkflows bool
57+
resyncPeriod time.Duration
5858
)
5959

6060
var rootCmd = &cobra.Command{
@@ -104,22 +104,22 @@ func NewImageCacheDaemonCommand() *cobra.Command {
104104
go staticSource.Run(ctx)
105105
}
106106

107-
if watchWorkflowTemplates {
107+
if watchArgoWorkflowTemplates {
108108
logrus.Info("watching workflow templates for images to pull")
109109

110110
workflowTemplateSource := source.NewWorkflowTemplateSource(argoclient, resyncPeriod)
111111
ip.AddSource(ctx, workflowTemplateSource)
112112
go workflowTemplateSource.Run(ctx)
113113
}
114114

115-
if watchClusterWorkflowTemplates {
115+
if watchArgoClusterWorkflowTemplates {
116116
logrus.Info("watching cluster workflow templates for images to pull")
117117
workflowTemplateSource := source.NewClusterWorkflowTemplateSource(argoclient, resyncPeriod)
118118
ip.AddSource(ctx, workflowTemplateSource)
119119
go workflowTemplateSource.Run(ctx)
120120
}
121121

122-
if watchCronWorkflows {
122+
if watchArgoCronWorkflows {
123123
logrus.Info("watching cron workflows for images to pull")
124124
workflowTemplateSource := source.NewCronWorkflowTemplateSource(argoclient, resyncPeriod)
125125
ip.AddSource(ctx, workflowTemplateSource)
@@ -147,9 +147,9 @@ func NewImageCacheDaemonCommand() *cobra.Command {
147147
rootCmd.Flags().StringVar(&podUUID, "pod-uid", os.Getenv("POD_UUD"), "The owning pod UID")
148148
rootCmd.Flags().StringVar(&podNamespace, "pod-namespace", os.Getenv("POD_NAMESPACE"), "The namespace this pod is running in")
149149
rootCmd.Flags().StringVar(&wardenImage, "warden-image", "exiges/image-cache-warden:latest", "The image that copies a binary to pulled containers to replace the entrypoint")
150-
rootCmd.Flags().BoolVar(&watchWorkflowTemplates, "watch-workflow-templates", true, "Whether or not to watch workflow templates")
151-
rootCmd.Flags().BoolVar(&watchClusterWorkflowTemplates, "watch-cluster-workflow-templates", true, "Whether or not to watch cluster workflow templates")
152-
rootCmd.Flags().BoolVar(&watchCronWorkflows, "watch-cron-workflows", true, "Whether or not to watch cron workflows")
150+
rootCmd.Flags().BoolVar(&watchArgoWorkflowTemplates, "watch-argo-workflow-templates", true, "Whether or not to watch workflow templates")
151+
rootCmd.Flags().BoolVar(&watchArgoClusterWorkflowTemplates, "watch-argo-cluster-workflow-templates", true, "Whether or not to watch cluster workflow templates")
152+
rootCmd.Flags().BoolVar(&watchArgoCronWorkflows, "watch-argo-cron-workflows", true, "Whether or not to watch cron workflows")
153153
rootCmd.Flags().DurationVar(&resyncPeriod, "resync-period", time.Minute*15, "How often the daemon should re-pull images from all of the sources. Set to 0 to disable.")
154154

155155
return rootCmd

0 commit comments

Comments
 (0)