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: Calico RBAC rules to delete Installations #347

Closed
wants to merge 1 commit into from
Closed
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

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions hack/addons/kustomize/tigera-operator/kustomization.yaml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,9 @@ helmCharts:
repo: https://docs.tigera.io/calico/charts

namespace: tigera-operator

patches:
- path: ./overlays/clusterrole.yaml
target:
kind: ClusterRole
name: tigera-operator
17 changes: 17 additions & 0 deletions hack/addons/kustomize/tigera-operator/overlays/clusterrole.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Copyright 2023 D2iQ, Inc. All rights reserved.
# SPDX-License-Identifier: Apache-2.0

# Unreleased fix from https://github.com/projectcalico/calico/commit/7f5db2347fc5f65ff74c67f7b588c8d9509f3dbe
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: NA
rules:
# In addition to the above, the operator should have the ability to delete their own resources during uninstallation.
- apiGroups:
- operator.tigera.io
resources:
- installations
- apiservers
verbs:
- delete
1 change: 1 addition & 0 deletions hack/addons/update-calico-manifests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ readonly FILE_NAME="tigera-operator.yaml"
readonly KUSTOMIZE_BASE_DIR="${SCRIPT_DIR}/kustomize/tigera-operator/"
envsubst -no-unset <"${KUSTOMIZE_BASE_DIR}/kustomization.yaml.tmpl" >"${ASSETS_DIR}/kustomization.yaml"
cp "${KUSTOMIZE_BASE_DIR}"/*.yaml "${ASSETS_DIR}"
cp -r "${KUSTOMIZE_BASE_DIR}"/overlays "${ASSETS_DIR}"

# The operator manifest in YAML format is pretty big. It turns out that much of that is whitespace. Converting the
# manifest to JSON without indentation allows us to remove most of the whitespace, reducing the size by more than half.
Expand Down
Loading