Skip to content

Commit

Permalink
use a shorter refresh period in the CLI
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolaferraro authored and lburgazzoli committed Oct 26, 2018
1 parent 5618b0c commit 980baca
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 11 deletions.
7 changes: 4 additions & 3 deletions Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions Gopkg.toml
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ required = [

[[constraint]]
name = "github.com/operator-framework/operator-sdk"
## Using fork to customize the Kubernetes rest config
#source = "https://github.com/nicolaferraro/operator-sdk.git"
#branch = "custom-init"
# The version rule is used for a specific release and the master branch for in between releases.
# Using fork to customize the Kubernetes rest config
source = "https://github.com/nicolaferraro/operator-sdk.git"
branch = "v0.0.7-custom"
## The version rule is used for a specific release and the master branch for in between releases.
#branch = "master"
version = "=v0.0.7"
#version = "=v0.0.7"
8 changes: 6 additions & 2 deletions pkg/client/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,10 @@ limitations under the License.
package cmd

import (
"os"

"context"
"github.com/operator-framework/operator-sdk/pkg/k8sclient"
"os"
"time"

"github.com/apache/camel-k/pkg/util/kubernetes"
"github.com/pkg/errors"
Expand Down Expand Up @@ -66,6 +67,9 @@ func NewKamelCommand(ctx context.Context) (*cobra.Command, error) {
cmd.Flag("namespace").Value.Set(current)
}

// Let's use a fast refresh period when running with the CLI
k8sclient.ResetCacheEvery(2 * time.Second)

// Initialize the Kubernetes client to allow using the operator-sdk
err := kubernetes.InitKubeClient(options.KubeConfig)
if err != nil {
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 980baca

Please sign in to comment.