Skip to content

Commit

Permalink
addt'l operator documentation
Browse files Browse the repository at this point in the history
Signed-off-by: Tommy Hughes <tohughes@redhat.com>
  • Loading branch information
tchughesiv committed Apr 29, 2024
1 parent 6915016 commit a987044
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 5 deletions.
2 changes: 2 additions & 0 deletions docs/how-to-guides/running-feast-in-production.md
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,8 @@ helm install feast-release feast-charts/feast-feature-server \

This will deploy a single service. The service must have read access to the registry file on cloud storage and to the online store (e.g. via [podAnnotations](https://kubernetes-on-aws.readthedocs.io/en/latest/user-guide/iam-roles.html)). It will keep a copy of the registry in their memory and periodically refresh it, so expect some delays in update propagation in exchange for better performance.

> Alternatively, deploy the same helm chart with a [Kubernetes Operator](/infra/feast-operator).
## 5. Using environment variables in your yaml configuration

You might want to dynamically set parts of your configuration from your environment. For instance to deploy Feast to production and development with the same configuration, but a different server. Or to inject secrets without exposing them in your git repo. To do this, it is possible to use the `${ENV_VAR}` syntax in your `feature_store.yaml` file. For instance:
Expand Down
1 change: 1 addition & 0 deletions infra/charts/feast-feature-server/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ A base64 encoded version of the `feature_store.yaml` file is needed. Helm instal
```
helm install feast-feature-server feast-charts/feast-feature-server --set feature_store_yaml_base64=$(base64 feature_store.yaml)
```
> Alternatively, deploy this helm chart with a [Kubernetes Operator](/infra/feast-operator).
## Tutorial
See [here](https://github.com/feast-dev/feast/tree/master/examples/python-helm-demo) for a sample tutorial on testing this helm chart with a demo feature repository and a local Redis instance.
Expand Down
38 changes: 33 additions & 5 deletions infra/feast-operator/README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,39 @@
# Feast Feature Server Helm-based Operator

Leverages [operator-sdk](https://github.com/operator-framework/operator-sdk) and the [feast-feature-server helm chart](/infra/charts/feast-feature-server).
This Operator was built with the [operator-sdk](https://github.com/operator-framework/operator-sdk) and leverages the [feast-feature-server helm chart](/infra/charts/feast-feature-server).

## Installation

1. __Install [kubectl](https://kubernetes.io/docs/tasks/tools/install-kubectl/)__
2. __Install the Operator on a Kubernetes cluster__

### To run against an K8S cluster -
```bash
$ make deploy
make deploy
```

# test the operator by deploying a feature server sample CR
$ oc apply -f config/samples/charts_v1alpha1_feastfeatureserver.yaml
3. __Install a Feast Feature Server on Kubernetes__

A base64 encoded version of the `feature_store.yaml` file is required. FeastFeatureServer CR install example:
```bash
cat <<EOF | kubectl create -f -
apiVersion: charts.feast.dev/v1alpha1
kind: FeastFeatureServer
metadata:
name: example
spec:
feature_store_yaml_base64: $(cat feature_store.yaml | base64)
EOF
```
Ensure it was successfully created on the cluster and that the `feature_store_yaml_base64` field was properly set. The following command should return output which is identical to your `feature_store.yaml`:
```bash
kubectl get feastfeatureserver example -o jsonpath={.spec.feature_store_yaml_base64} | base64 -d
```
Watch as the operator creates a running feast feature server:
```bash
kubectl get all
kubectl logs deploy/example-feast-feature-server
```

The `FeastFeatureServer.spec` allows one to configure the [same parameters](https://github.com/feast-dev/feast/tree/master/infra/charts/feast-feature-server#values) as the feast-feature-server helm chart. An example of this can be seen with the included sample [FeastFeatureServer](config/samples/charts_v1alpha1_feastfeatureserver.yaml).

> To install the aforementioned sample FeastFeatureServer, run this command - `kubectl create -f config/samples/charts_v1alpha1_feastfeatureserver.yaml`

0 comments on commit a987044

Please sign in to comment.