Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
ukff committed Jan 10, 2025
1 parent 0669565 commit 226707f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 22 deletions.
18 changes: 2 additions & 16 deletions config/rbac/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,31 +4,17 @@ kind: ClusterRole
metadata:
name: manager-role
rules:
- apiGroups:
- ""
resources:
- pods
verbs:
- list
- delete
- apiGroups:
- ""
resources:
- configmaps
- secrets
- serviceaccounts
- services
verbs:
- '*'
- apiGroups:
- ""
resources:
- pods
- namespaces
verbs:
- get
- list
- watch
- create
- '*'
- apiGroups:
- admissionregistration.k8s.io
resources:
Expand Down
5 changes: 2 additions & 3 deletions controllers/btpoperator_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -184,14 +184,13 @@ func NewBtpOperatorReconciler(client client.Client, scheme *runtime.Scheme, inst
// RBAC neccessary for the operator itself
//+kubebuilder:rbac:groups="operator.kyma-project.io",resources="btpoperators",verbs="*"
//+kubebuilder:rbac:groups="operator.kyma-project.io",resources="btpoperators/status",verbs="*"
//+kubebuilder:rbac:groups="",resources="namespaces",verbs=get;list;watch
//+kubebuilder:rbac:groups="",resources="pods",verbs="*"
//+kubebuilder:rbac:groups="",resources="namespaces",verbs="*"
//+kubebuilder:rbac:groups="services.cloud.sap.com",resources=serviceinstances;servicebindings,verbs="*"

// Autogenerated RBAC from the btp-operator chart
//+kubebuilder:rbac:groups="",resources="configmaps",verbs="*"
//+kubebuilder:rbac:groups="",resources="secrets",verbs="*"
//+kubebuilder:rbac:groups="",resources="pods",verbs="*"
//+kubebuilder:rbac:groups="",resources="namespaces",verbs="*"
//+kubebuilder:rbac:groups="",resources="serviceaccounts",verbs="*"
//+kubebuilder:rbac:groups="",resources="services",verbs="*"
//+kubebuilder:rbac:groups="admissionregistration.k8s.io",resources="mutatingwebhookconfigurations",verbs="*"
Expand Down
6 changes: 3 additions & 3 deletions scripts/testing/run_e2e_sap_btp_manager_secret_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,9 @@ do
sleep 2
done

echo -e "\n--- Checking if ${SAP_BTP_OPERATOR_SECRET_NAME} has been removed from ${RELEASE_NAMESPACE} namespace"
([[ "$(kubectl get secret -n ${RELEASE_NAMESPACE} ${SAP_BTP_OPERATOR_SECRET_NAME} 2>&1)" = *"Error from server (NotFound)"* ]] && echo "secret has been removed") || \
(echo "secret has not been removed" && exit 1)
#echo -e "\n--- Checking if ${SAP_BTP_OPERATOR_SECRET_NAME} has been removed from ${RELEASE_NAMESPACE} namespace"
#([[ "$(kubectl get secret -n ${RELEASE_NAMESPACE} ${SAP_BTP_OPERATOR_SECRET_NAME} 2>&1)" = *"Error from server (NotFound)"* ]] && echo "secret has been removed") || \
#(echo "secret has not been removed" && exit 1)

# Save the current data from secret and configmap
ACTUAL_SAP_BTP_OPERATOR_SECRET_CLIENT_ID=$(kubectl get secret -n ${MANAGEMENT_NAMESPACE} ${SAP_BTP_OPERATOR_SECRET_NAME} -o jsonpath="{.data.clientid}")
Expand Down

0 comments on commit 226707f

Please sign in to comment.