Skip to content

Commit 8083056

Browse files
author
Oleg Sucharevich
authored
pass dockerd params to register call (#41)
1 parent 07681d9 commit 8083056

File tree

7 files changed

+16
-5
lines changed

7 files changed

+16
-5
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "venona",
3-
"version": "0.22.1",
3+
"version": "0.23.0",
44
"description": "Codefresh agent to run on Codefresh's runtime environment and execute pipeline",
55
"main": "index.js",
66
"scripts": {

venonactl/cmd/install.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ var installCmdOptions struct {
4545
skipRuntimeInstallation bool
4646
runtimeEnvironmentName string
4747
kubernetesRunnerType bool
48+
dockerDaemonParams string
4849
}
4950

5051
// installCmd represents the install command
@@ -69,6 +70,7 @@ var installCmd = &cobra.Command{
6970
IsDefaultStorageClass: isDefault,
7071
DryRun: installCmdOptions.dryRun,
7172
KubernetesRunnerType: installCmdOptions.kubernetesRunnerType,
73+
DockerDaemonParams: installCmdOptions.dockerDaemonParams,
7274
}
7375

7476
if installCmdOptions.kubernetesRunnerType {
@@ -160,6 +162,7 @@ func init() {
160162
installCmd.Flags().StringVar(&installCmdOptions.kube.namespace, "kube-namespace", viper.GetString("kube-namespace"), "Name of the namespace on which venona should be installed [$KUBE_NAMESPACE]")
161163
installCmd.Flags().StringVar(&installCmdOptions.kube.context, "kube-context-name", viper.GetString("kube-context"), "Name of the kubernetes context on which venona should be installed (default is current-context) [$KUBE_CONTEXT]")
162164
installCmd.Flags().StringVar(&installCmdOptions.storageClass, "storage-class", "", "Set a name of your custom storage class, note: this will not install volume provisioning components")
165+
installCmd.Flags().StringVar(&installCmdOptions.dockerDaemonParams, "dockerd-params", "", "Params to be added to each workflow for the docker daemon (https://docs.docker.com/engine/reference/commandline/dockerd/)")
163166

164167
installCmd.Flags().BoolVar(&installCmdOptions.skipRuntimeInstallation, "skip-runtime-installation", false, "Set flag if you already have a configured runtime-environment, add --runtime-environment flag with name")
165168
installCmd.Flags().BoolVar(&installCmdOptions.kube.inCluster, "in-cluster", false, "Set flag if venona is been installed from inside a cluster")

venonactl/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ module github.com/codefresh-io/venona/venonactl
33
require (
44
contrib.go.opencensus.io/exporter/ocagent v0.4.3 // indirect
55
github.com/Azure/go-autorest v11.4.0+incompatible // indirect
6-
github.com/codefresh-io/go-sdk v0.13.0
6+
github.com/codefresh-io/go-sdk v0.14.0
77
github.com/dgrijalva/jwt-go v3.2.0+incompatible // indirect
88
github.com/dustin/go-humanize v1.0.0
99
github.com/go-stack/stack v1.8.0 // indirect

venonactl/go.sum

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ github.com/census-instrumentation/opencensus-proto v0.1.0-0.20181214143942-ba49f
1616
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
1717
github.com/codefresh-io/go-sdk v0.13.0 h1:puGXvsMISaA3yoFsnf5YSziR8IEHBlATG+KQPvCflrY=
1818
github.com/codefresh-io/go-sdk v0.13.0/go.mod h1:U8c2f9/Vb2SXFbeKHSzofUOp3N78pDC3YdshFsUfdgc=
19+
github.com/codefresh-io/go-sdk v0.14.0 h1:pQusBIulCyorNAkmsjalUdjRuzdjrekZW3d4IWrq5sY=
20+
github.com/codefresh-io/go-sdk v0.14.0/go.mod h1:U8c2f9/Vb2SXFbeKHSzofUOp3N78pDC3YdshFsUfdgc=
1921
github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE=
2022
github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk=
2123
github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk=

venonactl/pkg/codefresh/cfapi.go

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ type (
4242
StorageClass string
4343
IsDefaultStorageClass bool
4444
KubernetesRunnerType bool
45+
DockerDaemonParams string
4546
}
4647

4748
RuntimeEnvironmentRegistrator interface {
@@ -60,6 +61,7 @@ type (
6061
storageClass string
6162
isDefaultStorageClass bool
6263
kubernetesRunnerType bool
64+
dockerDaemonParams string
6365
}
6466

6567
logger interface {
@@ -83,6 +85,7 @@ func NewCodefreshAPI(opt *APIOptions) API {
8385
storageClass: opt.StorageClass,
8486
isDefaultStorageClass: opt.IsDefaultStorageClass,
8587
kubernetesRunnerType: opt.KubernetesRunnerType,
88+
dockerDaemonParams: opt.DockerDaemonParams,
8689
}
8790
}
8891

@@ -161,9 +164,10 @@ func (a *api) Sign() (*certs.ServerCert, error) {
161164
func (a *api) Register() (*codefresh.RuntimeEnvironment, error) {
162165
a.logger.Debug("Registering runtime-environment")
163166
options := &codefresh.CreateRuntimeOptions{
164-
Namespace: a.clusternamespace,
165-
HasAgent: a.registerWithAgent,
166-
Cluster: a.clustername,
167+
Namespace: a.clusternamespace,
168+
HasAgent: a.registerWithAgent,
169+
Cluster: a.clustername,
170+
DockerDaemonParams: a.dockerDaemonParams,
167171
}
168172
if a.kubernetesRunnerType {
169173
options.RunnerType = codefresh.KubernetesRunnerType

venonactl/pkg/plugins/plugin.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ type (
5252
}
5353
DryRun bool
5454
KubernetesRunnerType bool
55+
DockerDaemonParams string
5556
}
5657

5758
DeleteOptions struct {

venonactl/pkg/plugins/runtime-environment.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ func (u *runtimeEnvironmentPlugin) Install(opt *InstallOptions, v Values) (Value
5252
StorageClass: opt.StorageClass,
5353
IsDefaultStorageClass: opt.IsDefaultStorageClass,
5454
KubernetesRunnerType: opt.KubernetesRunnerType,
55+
DockerDaemonParams: opt.DockerDaemonParams,
5556
}
5657

5758
cf := codefresh.NewCodefreshAPI(cfOpt)

0 commit comments

Comments
 (0)