Skip to content

Commit affffff

Browse files
CR-11454 namespace labels flag (#368)
* namespace labels flag * example fix * bump version * wip * bump version * codegen * bump autopilot
1 parent 2c24d52 commit affffff

File tree

7 files changed

+35
-31
lines changed

7 files changed

+35
-31
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
VERSION=v0.0.328
1+
VERSION=v0.0.329
22

33
OUT_DIR=dist
44
YEAR?=$(shell date +"%Y")

cmd/commands/runtime.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ type (
9797
GitIntegrationRegistrationOpts *apmodel.RegisterToGitIntegrationArgs
9898
KubeFactory kube.Factory
9999
CommonConfig *runtime.CommonConfig
100+
NamespaceLabels map[string]string
100101
versionStr string
101102
kubeContext string
102103
kubeconfig string
@@ -254,6 +255,7 @@ func NewRuntimeInstallCommand() *cobra.Command {
254255
cmd.Flags().BoolVar(&store.Get().BypassIngressClassCheck, "bypass-ingress-class-check", false, "Disables the ingress class check during pre-installation")
255256
cmd.Flags().BoolVar(&installationOpts.DisableTelemetry, "disable-telemetry", false, "If true, will disable the analytics reporting for the installation process")
256257
cmd.Flags().BoolVar(&store.Get().SetDefaultResources, "set-default-resources", false, "If true, will set default requests and limits on all of the runtime components")
258+
cmd.Flags().StringToStringVar(&installationOpts.NamespaceLabels, "namespace-labels", nil, "Optional labels that will be set on the namespace resource. (e.g. \"key1=value1,key2=value2\"")
257259

258260
installationOpts.InsCloneOpts = apu.AddCloneFlags(cmd, &apu.CloneFlagsOptions{
259261
CreateIfNotExist: true,
@@ -621,6 +623,7 @@ func RunRuntimeInstall(ctx context.Context, opts *RuntimeInstallOptions) error {
621623
BootstrapAppsLabels: map[string]string{
622624
store.Get().LabelKeyCFInternal: "true",
623625
},
626+
NamespaceLabels: opts.NamespaceLabels,
624627
})
625628
handleCliStep(reporter.InstallStepBootstrapRepo, "Bootstrapping repository", err, false, true)
626629
if err != nil {

docs/commands/cli-v2_runtime_install.md

Lines changed: 22 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -28,27 +28,28 @@ cli-v2 runtime install [runtime_name] [flags]
2828
### Options
2929

3030
```
31-
--context string The name of the kubeconfig context to use
32-
--demo-resources Installs demo resources (default: true) (default true)
33-
--disable-rollback If true, will not perform installation rollback after a failed installation
34-
--disable-telemetry If true, will disable the analytics reporting for the installation process
35-
-t, --git-token string Your git provider api token [GIT_TOKEN]
36-
-u, --git-user string Your git provider user name [GIT_USER] (not required in GitHub)
37-
-h, --help help for install
38-
--ingress-class string The ingress class name
39-
--ingress-host string The ingress host
40-
--kubeconfig string Path to the kubeconfig file to use for CLI requests.
41-
-n, --namespace string If present, the namespace scope for this CLI request
42-
--personal-git-token string The Personal git token for your user
43-
--provider string The git provider, one of: azure|gitea|github|gitlab
44-
--provider-api-url string Git provider API url
45-
--repo string Repository URL [GIT_REPO]
46-
--set-default-resources If true, will set default requests and limits on all of the runtime components
47-
--skip-cluster-checks Skips the cluster's checks
48-
--skip-ingress Skips the creation of ingress resources
49-
-b, --upsert-branch If true will try to checkout the specified branch and create it if it doesn't exist
50-
--version string The runtime version to install (default: latest)
51-
--wait-timeout duration How long to wait for the runtime components to be ready (default 8m0s)
31+
--context string The name of the kubeconfig context to use
32+
--demo-resources Installs demo resources (default: true) (default true)
33+
--disable-rollback If true, will not perform installation rollback after a failed installation
34+
--disable-telemetry If true, will disable the analytics reporting for the installation process
35+
-t, --git-token string Your git provider api token [GIT_TOKEN]
36+
-u, --git-user string Your git provider user name [GIT_USER] (not required in GitHub)
37+
-h, --help help for install
38+
--ingress-class string The ingress class name
39+
--ingress-host string The ingress host
40+
--kubeconfig string Path to the kubeconfig file to use for CLI requests.
41+
-n, --namespace string If present, the namespace scope for this CLI request
42+
--namespace-labels stringToString Optional labels that will be set on the namespace resource. (e.g. "key1=value1,key2=value2" (default [])
43+
--personal-git-token string The Personal git token for your user
44+
--provider string The git provider, one of: azure|gitea|github|gitlab
45+
--provider-api-url string Git provider API url
46+
--repo string Repository URL [GIT_REPO]
47+
--set-default-resources If true, will set default requests and limits on all of the runtime components
48+
--skip-cluster-checks Skips the cluster's checks
49+
--skip-ingress Skips the creation of ingress resources
50+
-b, --upsert-branch If true will try to checkout the specified branch and create it if it doesn't exist
51+
--version string The runtime version to install (default: latest)
52+
--wait-timeout duration How long to wait for the runtime components to be ready (default 8m0s)
5253
```
5354

5455
### Options inherited from parent commands

docs/releases/release_notes.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ cf version
2323

2424
```bash
2525
# download and extract the binary
26-
curl -L --output - https://github.com/codefresh-io/cli-v2/releases/download/v0.0.328/cf-linux-amd64.tar.gz | tar zx
26+
curl -L --output - https://github.com/codefresh-io/cli-v2/releases/download/v0.0.329/cf-linux-amd64.tar.gz | tar zx
2727

2828
# move the binary to your $PATH
2929
mv ./cf-linux-amd64 /usr/local/bin/cf
@@ -36,7 +36,7 @@ cf version
3636

3737
```bash
3838
# download and extract the binary
39-
curl -L --output - https://github.com/codefresh-io/cli-v2/releases/download/v0.0.328/cf-darwin-amd64.tar.gz | tar zx
39+
curl -L --output - https://github.com/codefresh-io/cli-v2/releases/download/v0.0.329/cf-darwin-amd64.tar.gz | tar zx
4040

4141
# move the binary to your $PATH
4242
mv ./cf-darwin-amd64 /usr/local/bin/cf

go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ go 1.18
44

55
require (
66
github.com/Masterminds/semver/v3 v3.1.1
7-
github.com/argoproj-labs/argocd-autopilot v0.3.5
7+
github.com/argoproj-labs/argocd-autopilot v0.3.6
88
github.com/argoproj/applicationset v0.4.1
99
github.com/argoproj/argo-cd/v2 v2.3.3
1010
github.com/argoproj/argo-events v0.17.1-0.20220327045437-70eaafe9afec
@@ -114,8 +114,8 @@ require (
114114
github.com/golang/protobuf v1.5.2 // indirect
115115
github.com/google/btree v1.0.1 // indirect
116116
github.com/google/go-cmp v0.5.7 // indirect
117-
github.com/google/go-github/v35 v35.3.0 // indirect
118117
github.com/google/go-github/v41 v41.0.0 // indirect
118+
github.com/google/go-github/v43 v43.0.0 // indirect
119119
github.com/google/go-jsonnet v0.18.0 // indirect
120120
github.com/google/go-querystring v1.1.0 // indirect
121121
github.com/google/gofuzz v1.2.0 // indirect

go.sum

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -152,8 +152,8 @@ github.com/antonmedv/expr v1.9.0/go.mod h1:5qsM3oLGDND7sDmQGDXHkYfkjYMUX14qsgqmH
152152
github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ=
153153
github.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ=
154154
github.com/appscode/go v0.0.0-20190808133642-1d4ef1f1c1e0/go.mod h1:iy07dV61Z7QQdCKJCIvUoDL21u6AIceRhZzyleh2ymc=
155-
github.com/argoproj-labs/argocd-autopilot v0.3.5 h1:8Q4hcIP76Mge/gRL4cttk1AGZrSPVSfuRiYCHJkDrBs=
156-
github.com/argoproj-labs/argocd-autopilot v0.3.5/go.mod h1:vQ9RtSwK9yG6BgaxJ0yEQ35AKFz8DSksTIvZlodWDaY=
155+
github.com/argoproj-labs/argocd-autopilot v0.3.6 h1:7/1oq/YVCqPMPpGJ9zFK3GEI4G5tZFI5ZgqGf8YucsE=
156+
github.com/argoproj-labs/argocd-autopilot v0.3.6/go.mod h1:KFbmBBjYrK355/0iXYoLAbNt0TaomSlKrUWda+KVlAw=
157157
github.com/argoproj/applicationset v0.4.1 h1:PzTn77TK7XQB3CdpCDPbwU4pQgip0x4qvuJQ8XiBk5E=
158158
github.com/argoproj/applicationset v0.4.1/go.mod h1:cJZ7CWG80kBII4QNalyAvSr8eVifo8jKkyXoVl9qXaA=
159159
github.com/argoproj/argo-cd/v2 v2.3.3 h1:SE1Cb8MDqP5T2iUtyL9bwpKYIvpGkVUsgzKCAqZZ5Vc=
@@ -624,10 +624,10 @@ github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/
624624
github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
625625
github.com/google/go-cmp v0.5.7 h1:81/ik6ipDQS2aGcBfIN5dHDB36BwrStyeAQquSYCV4o=
626626
github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE=
627-
github.com/google/go-github/v35 v35.3.0 h1:fU+WBzuukn0VssbayTT+Zo3/ESKX9JYWjbZTLOTEyho=
628-
github.com/google/go-github/v35 v35.3.0/go.mod h1:yWB7uCcVWaUbUP74Aq3whuMySRMatyRmq5U9FTNlbio=
629627
github.com/google/go-github/v41 v41.0.0 h1:HseJrM2JFf2vfiZJ8anY2hqBjdfY1Vlj/K27ueww4gg=
630628
github.com/google/go-github/v41 v41.0.0/go.mod h1:XgmCA5H323A9rtgExdTcnDkcqp6S30AVACCBDOonIxg=
629+
github.com/google/go-github/v43 v43.0.0 h1:y+GL7LIsAIF2NZlJ46ZoC/D1W1ivZasT0lnWHMYPZ+U=
630+
github.com/google/go-github/v43 v43.0.0/go.mod h1:ZkTvvmCXBvsfPpTHXnH/d2hP9Y0cTbvN9kr5xqyXOIc=
631631
github.com/google/go-jsonnet v0.18.0 h1:/6pTy6g+Jh1a1I2UMoAODkqELFiVIdOxbNwv0DDzoOg=
632632
github.com/google/go-jsonnet v0.18.0/go.mod h1:C3fTzyVJDslXdiTqw/bTFk7vSGyCtH3MGRbDfvEwGd0=
633633
github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck=

manifests/runtime.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ metadata:
55
namespace: "{{ namespace }}"
66
spec:
77
defVersion: 1.0.1
8-
version: 0.0.328
8+
version: 0.0.329
99
bootstrapSpecifier: github.com/codefresh-io/cli-v2/manifests/argo-cd
1010
components:
1111
- name: events

0 commit comments

Comments
 (0)