Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix karmor uninstall #382

Merged
merged 2 commits into from
Nov 17, 2023
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
2 changes: 1 addition & 1 deletion .github/workflows/ci-ginkgo-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: "v1.20"
go-version: "v1.21"
- name: Create k8s Kind Cluster
uses: helm/kind-action@v1.3.0
- name: Test connectivity
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/ci-go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:

- uses: actions/setup-go@v2
with:
go-version: "v1.20"
go-version: "v1.21"

- name: Build karmor
run: make
Expand All @@ -31,7 +31,7 @@ jobs:

- uses: actions/setup-go@v2
with:
go-version: "v1.20"
go-version: "v1.21"

- name: Check gofmt
run: make gofmt
Expand All @@ -44,7 +44,7 @@ jobs:

- uses: actions/setup-go@v2
with:
go-version: "v1.20"
go-version: "v1.21"

- name: Run Gosec Security Scanner
run: make gosec
Expand All @@ -68,7 +68,7 @@ jobs:

- uses: actions/setup-go@v2
with:
go-version: "v1.20"
go-version: "v1.21"

- name: Run unit tests
run: make test
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
name: Set up Go
uses: actions/setup-go@v2
with:
go-version: "1.20"
go-version: "1.21"

- name: Install Cosign
uses: sigstore/cosign-installer@main
Expand Down
2 changes: 1 addition & 1 deletion cmd/uninstall.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ var uninstallCmd = &cobra.Command{
func init() {
rootCmd.AddCommand(uninstallCmd)

uninstallCmd.Flags().StringVarP(&uninstallOptions.Namespace, "namespace", "n", "kubearmor", "Namespace for resources")
uninstallCmd.Flags().StringVarP(&uninstallOptions.Namespace, "namespace", "n", "", "If no namespace is specified, it defaults to all namespaces and deletes all KubeArmor objects across them.")
uninstallCmd.Flags().BoolVar(&uninstallOptions.Force, "force", false, "Force remove KubeArmor annotations from deployments. (Deployments might be restarted)")
uninstallCmd.Flags().BoolVar(&uninstallOptions.Verify, "verify", true, "Verify whether all KubeArmor resources are cleaned up or not")
}
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/kubearmor/kubearmor-client

go 1.20
go 1.21

replace (
github.com/etcd-io/bbolt => go.etcd.io/bbolt v1.3.6
Expand Down
46 changes: 46 additions & 0 deletions go.sum

Large diffs are not rendered by default.

18 changes: 17 additions & 1 deletion install/defaults.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,23 @@
var kubearmor = "kubearmor"

var serviceAccountName = kubearmor
var clusterRoleBindingName = "kubearmor-clusterrolebinding"
var operatorServiceAccountName = "kubearmor-operator"
var KubeArmorOperatorClusterRoleName = "kubearmor-operator-clusterrole"

Check warning on line 10 in install/defaults.go

View workflow job for this annotation

GitHub Actions / go-lint

exported var KubeArmorOperatorClusterRoleName should have comment or be unexported
var KubeArmorOperatorManageClusterRoleName = "kubearmor-operator-manage-kubearmor-clusterrole"

Check warning on line 11 in install/defaults.go

View workflow job for this annotation

GitHub Actions / go-lint

exported var KubeArmorOperatorManageClusterRoleName should have comment or be unexported
var KubeArmorOperatorManageControllerClusterRoleName = "kubearmor-operator-manage-controller-clusterrole"

Check warning on line 12 in install/defaults.go

View workflow job for this annotation

GitHub Actions / go-lint

exported var KubeArmorOperatorManageControllerClusterRoleName should have comment or be unexported
var KubeArmorClusterRoleName = "kubearmor-clusterrole"

Check warning on line 13 in install/defaults.go

View workflow job for this annotation

GitHub Actions / go-lint

exported var KubeArmorClusterRoleName should have comment or be unexported
var KubeArmorControllerClusterRoleName = "kubearmor-controller-clusterrole"

Check warning on line 14 in install/defaults.go

View workflow job for this annotation

GitHub Actions / go-lint

exported var KubeArmorControllerClusterRoleName should have comment or be unexported
var KubeArmorSnitchClusterRoleName = "kubearmor-snitch"

Check warning on line 15 in install/defaults.go

View workflow job for this annotation

GitHub Actions / go-lint

exported var KubeArmorSnitchClusterRoleName should have comment or be unexported
var KubeArmorControllerProxyClusterRoleName = "kubearmor-controller-proxy-role"

Check warning on line 16 in install/defaults.go

View workflow job for this annotation

GitHub Actions / go-lint

exported var KubeArmorControllerProxyClusterRoleName should have comment or be unexported

var KubeArmorSnitchClusterroleBindingName = "kubearmor-snitch-binding"

Check warning on line 18 in install/defaults.go

View workflow job for this annotation

GitHub Actions / go-lint

exported var KubeArmorSnitchClusterroleBindingName should have comment or be unexported
var KubeArmorControllerProxyClusterRoleBindingName = "kubearmor-controller-proxy-rolebinding"

Check warning on line 19 in install/defaults.go

View workflow job for this annotation

GitHub Actions / go-lint

exported var KubeArmorControllerProxyClusterRoleBindingName should have comment or be unexported
var KubeArmorControllerClusterRoleBindingName = "kubearmor-controller-clusterrolebinding"
var KubeArmorClusterRoleBindingName = "kubearmor-clusterrolebinding"
var KubeArmorOperatorManageControllerClusterRoleBindingName = "kubearmor-operator-manage-controller-clusterrole-binding"
var KubeArmorOperatorManageClusterRoleBindingName = "kubearmor-operator-manage-kubearmor-clusterrole-binding"
var KubeArmorOperatorClusterRoleBindingName = "kubearmor-operator-clusterrole-binding"

var relayServiceName = kubearmor
var relayDeploymentName = "kubearmor-relay"
var policyManagerServiceName = "kubearmor-policy-manager-metrics-service"
Expand Down
Loading
Loading