Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions internal/cmd/operator-sdk/run/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ package run
import (
"github.com/spf13/cobra"

"github.com/operator-framework/operator-sdk/internal/cmd/operator-sdk/run/bundle"
"github.com/operator-framework/operator-sdk/internal/cmd/operator-sdk/run/packagemanifests"
"github.com/operator-framework/operator-sdk/internal/olm/operator"
)
Expand All @@ -25,16 +26,13 @@ func NewCmd() *cobra.Command {
cmd := &cobra.Command{
Use: "run",
Short: "Run an Operator in a variety of environments",
// TODO(joelanford): remove the second sentence when `run bundle` implementation is complete
Long: `This command has subcommands that will deploy your Operator with OLM.
Currently only the package manifests format is supported via the 'packagemanifests' subcommand.`,
Long: `This command has subcommands that will deploy your Operator with OLM.`,
}

cfg := &operator.Configuration{}

cmd.AddCommand(
// TODO(joelanford): enable bundle command when implementation is complete
// bundle.NewCmd(cfg),
bundle.NewCmd(cfg),
packagemanifests.NewCmd(cfg),
)

Expand Down
5 changes: 3 additions & 2 deletions internal/cmd/operator-sdk/run/cmd_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,9 @@ var _ = Describe("Running a run command", func() {
Expect(cmd.Long).NotTo(BeNil())

subcommands := cmd.Commands()
Expect(len(subcommands)).To(Equal(1))
Expect(subcommands[0].Use).To(Equal("packagemanifests [packagemanifests-root-dir]"))
Expect(len(subcommands)).To(Equal(2))
Expect(subcommands[0].Use).To(Equal("bundle <bundle-image>"))
Expect(subcommands[1].Use).To(Equal("packagemanifests [packagemanifests-root-dir]"))
})
})
})
Original file line number Diff line number Diff line change
Expand Up @@ -172,17 +172,6 @@ spec:
control-plane: controller-manager
spec:
containers:
- args:
- --secure-listen-address=0.0.0.0:8443
- --upstream=http://127.0.0.1:8080/
- --logtostderr=true
- --v=10
image: gcr.io/kubebuilder/kube-rbac-proxy:v0.5.0
name: kube-rbac-proxy
ports:
- containerPort: 8443
name: https
resources: {}
- args:
- --metrics-addr=127.0.0.1:8080
- --enable-leader-election
Expand All @@ -196,6 +185,17 @@ spec:
requests:
cpu: 100m
memory: 60Mi
- args:
- --secure-listen-address=0.0.0.0:8443
- --upstream=http://127.0.0.1:8080/
- --logtostderr=true
- --v=10
image: gcr.io/kubebuilder/kube-rbac-proxy:v0.5.0
name: kube-rbac-proxy
ports:
- containerPort: 8443
name: https
resources: {}
terminationGracePeriodSeconds: 10
permissions:
- rules:
Expand Down
2 changes: 1 addition & 1 deletion website/content/en/docs/cli/operator-sdk_run.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ Run an Operator in a variety of environments
### Synopsis

This command has subcommands that will deploy your Operator with OLM.
Currently only the package manifests format is supported via the 'packagemanifests' subcommand.

### Options

Expand All @@ -25,5 +24,6 @@ Currently only the package manifests format is supported via the 'packagemanifes
### SEE ALSO

* [operator-sdk](../operator-sdk) - Development kit for building Kubernetes extensions and tools.
* [operator-sdk run bundle](../operator-sdk_run_bundle) - Deploy an Operator in the bundle format with OLM
* [operator-sdk run packagemanifests](../operator-sdk_run_packagemanifests) - Deploy an Operator in the package manifests format with OLM

36 changes: 36 additions & 0 deletions website/content/en/docs/cli/operator-sdk_run_bundle.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
title: "operator-sdk run bundle"
---
## operator-sdk run bundle

Deploy an Operator in the bundle format with OLM

### Synopsis

Deploy an Operator in the bundle format with OLM

```
operator-sdk run bundle <bundle-image> [flags]
```

### Options

```
--index-image string index image in which to inject bundle (default "quay.io/operator-framework/upstream-opm-builder:latest")
--install-mode InstallModeValue install mode
--timeout duration install timeout (default 2m0s)
--kubeconfig string Path to the kubeconfig file to use for CLI requests.
-n, --namespace string If present, namespace scope for this CLI request
-h, --help help for bundle
```

### Options inherited from parent commands

```
--verbose Enable verbose logging
```

### SEE ALSO

* [operator-sdk run](../operator-sdk_run) - Run an Operator in a variety of environments