Skip to content

Commit

Permalink
feat: Add Feast Operator RBAC example with Kubernetes Authentication …
Browse files Browse the repository at this point in the history
…type.

Signed-off-by: Abdul Hameed <[email protected]>
  • Loading branch information
redhatHameed committed Mar 5, 2025
1 parent 2c46f6a commit d7eca8c
Show file tree
Hide file tree
Showing 8 changed files with 1,902 additions and 4 deletions.
3 changes: 2 additions & 1 deletion examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,5 @@ The following examples illustrate various **Feast** use cases to enhance underst
The examples below showcase how to deploy and manage **Feast on Kubernetes** using the **Feast Go Operator**.

1. **[Operator Quickstart](operator-quickstart)**: Demonstrates how to install and use Feast on Kubernetes with the Feast Go Operator.
1. **[Operator Quickstart with Postgres in TLS](operator-postgres-tls-demo)**: Demonstrates installing and configuring Feast with PostgreSQL in TLS mode on Kubernetes using the Feast Go Operator, with an emphasis on volumes and VolumeMounts support.
1. **[Operator Quickstart with Postgres in TLS](operator-postgres-tls-demo)**: Demonstrates installing and configuring Feast with PostgreSQL in TLS mode on Kubernetes using the Feast Go Operator, with an emphasis on volumes and VolumeMounts support.
1. **[Operator RBAC with Kubernetes](operator-rbac)**: Demonstrates the Feast RBAC example on Kubernetes using the Feast Operator.
175 changes: 175 additions & 0 deletions examples/operator-rbac/03-uninstall.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,175 @@
{
"cells": [
{
"metadata": {},
"cell_type": "code",
"outputs": [],
"execution_count": null,
"source": "## Uninstall",
"id": "bd1a081f3f7f5752"
},
{
"metadata": {},
"cell_type": "markdown",
"source": "### Uninstall the Operator and all Feast related objects##",
"id": "1175f3d6c5ee9bf0"
},
{
"metadata": {
"ExecuteTime": {
"end_time": "2025-03-05T19:09:52.349677Z",
"start_time": "2025-03-05T19:09:46.308482Z"
}
},
"cell_type": "code",
"source": [
"!kubectl delete -f ../../infra/feast-operator/config/samples/v1alpha1_featurestore_kubernetes_auth.yaml\n",
"!kubectl delete -f ../../infra/feast-operator/dist/install.yaml"
],
"id": "f4b4c6fa4a1fe0a8",
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"featurestore.feast.dev \"sample-kubernetes-auth\" deleted\r\n",
"namespace \"feast-operator-system\" deleted\r\n",
"customresourcedefinition.apiextensions.k8s.io \"featurestores.feast.dev\" deleted\r\n",
"serviceaccount \"feast-operator-controller-manager\" deleted\r\n",
"role.rbac.authorization.k8s.io \"feast-operator-leader-election-role\" deleted\r\n",
"clusterrole.rbac.authorization.k8s.io \"feast-operator-featurestore-editor-role\" deleted\r\n",
"clusterrole.rbac.authorization.k8s.io \"feast-operator-featurestore-viewer-role\" deleted\r\n",
"clusterrole.rbac.authorization.k8s.io \"feast-operator-manager-role\" deleted\r\n",
"clusterrole.rbac.authorization.k8s.io \"feast-operator-metrics-auth-role\" deleted\r\n",
"clusterrole.rbac.authorization.k8s.io \"feast-operator-metrics-reader\" deleted\r\n",
"rolebinding.rbac.authorization.k8s.io \"feast-operator-leader-election-rolebinding\" deleted\r\n",
"clusterrolebinding.rbac.authorization.k8s.io \"feast-operator-manager-rolebinding\" deleted\r\n",
"clusterrolebinding.rbac.authorization.k8s.io \"feast-operator-metrics-auth-rolebinding\" deleted\r\n",
"service \"feast-operator-controller-manager-metrics-service\" deleted\r\n",
"deployment.apps \"feast-operator-controller-manager\" deleted\r\n"
]
}
],
"execution_count": 6
},
{
"metadata": {},
"cell_type": "markdown",
"source": "## Uninstall Client Related Objects",
"id": "2a2aa884aeddfb99"
},
{
"metadata": {
"ExecuteTime": {
"end_time": "2025-03-05T19:09:54.655575Z",
"start_time": "2025-03-05T19:09:53.553918Z"
}
},
"cell_type": "code",
"source": [
"!echo \"Deleting RoleBindings...\"\n",
"!kubectl delete rolebinding feast-user-rolebinding -n feast --ignore-not-found\n",
"!kubectl delete rolebinding feast-admin-rolebinding -n feast --ignore-not-found\n",
"\n",
"!echo \"Deleting ServiceAccounts...\"\n",
"!kubectl delete serviceaccount feast-user-sa -n feast --ignore-not-found\n",
"!kubectl delete serviceaccount feast-admin-sa -n feast --ignore-not-found\n",
"!kubectl delete serviceaccount feast-unauthorized-user-sa -n feast --ignore-not-found\n"
],
"id": "6ce30879d64bbd06",
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Deleting RoleBindings...\r\n",
"rolebinding.rbac.authorization.k8s.io \"feast-user-rolebinding\" deleted\r\n",
"rolebinding.rbac.authorization.k8s.io \"feast-admin-rolebinding\" deleted\r\n",
"Deleting ServiceAccounts...\r\n",
"serviceaccount \"feast-user-sa\" deleted\r\n",
"serviceaccount \"feast-admin-sa\" deleted\r\n",
"serviceaccount \"feast-unauthorized-user-sa\" deleted\r\n"
]
}
],
"execution_count": 7
},
{
"metadata": {},
"cell_type": "markdown",
"source": "Ensure everything has been removed, or is in the process of being terminated.",
"id": "638421caa8ff849e"
},
{
"metadata": {
"ExecuteTime": {
"end_time": "2025-03-05T19:09:59.868383Z",
"start_time": "2025-03-05T19:09:59.611048Z"
}
},
"cell_type": "code",
"source": "!kubectl get all -n feast\n",
"id": "587eb85352a8a353",
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"No resources found in feast namespace.\r\n"
]
}
],
"execution_count": 8
},
{
"metadata": {
"ExecuteTime": {
"end_time": "2025-03-05T19:10:07.846749Z",
"start_time": "2025-03-05T19:10:02.561070Z"
}
},
"cell_type": "code",
"source": "!kubectl delete namespace feast",
"id": "7a0ce2d9e4a92828",
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"namespace \"feast\" deleted\r\n"
]
}
],
"execution_count": 9
},
{
"metadata": {},
"cell_type": "code",
"outputs": [],
"execution_count": null,
"source": "",
"id": "10707783148c5f8d"
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 2
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython2",
"version": "2.7.6"
}
},
"nbformat": 4,
"nbformat_minor": 5
}
Loading

0 comments on commit d7eca8c

Please sign in to comment.