Skip to content

Commit

Permalink
fix: Do not recreate namespace jx-git-operator
Browse files Browse the repository at this point in the history
https://kubernetes.slack.com/archives/C9MBGQJRH/p1647955769010979
jenkins-x/jx3-versions#2963
Signed-off-by: Damian Kęska <372403+keskad@users.noreply.github.com>
  • Loading branch information
keskad committed Mar 22, 2022
1 parent eddd08c commit 24ba6bc
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions pkg/cmd/namespace/namespace.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,14 @@ func (o *Options) RunDirMode() error {
}

func (o *Options) lazyCreateNamespaceResource(ns string) error {
// this namespace is created by `jx admin` and there is a possibly a difference in e.g. labels, so kubectl --prune can harm
// temporary fix: https://kubernetes.slack.com/archives/C9MBGQJRH/p1647955769010979
// before everybody will have https://github.com/jenkins-x/jx3-versions/pull/2963
// todo: Find a better solution
if ns == "jx-git-operator" {
return nil
}

dir := filepath.Dir(o.ClusterDir)

found := false
Expand Down

0 comments on commit 24ba6bc

Please sign in to comment.