-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ability to whitelist on feature table level (#101)
Signed-off-by: Khor Shu Heng <khor.heng@go-jek.com> linting Signed-off-by: Khor Shu Heng <khor.heng@go-jek.com> fix parameter Signed-off-by: Khor Shu Heng <khor.heng@go-jek.com> fix linting Signed-off-by: Khor Shu Heng <khor.heng@go-jek.com> add options to mount config maps add options to mount config maps Signed-off-by: Khor Shu Heng <khor.heng@go-jek.com>
- Loading branch information
1 parent
7825d58
commit 6e40e27
Showing
11 changed files
with
127 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
apiVersion: v1 | ||
description: Feast Extension for running Ingestion on Spark | ||
name: feast-spark | ||
version: 0.2.15 | ||
version: 0.2.16 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
apiVersion: v1 | ||
description: Feast Job Service manage ingestion jobs. | ||
name: feast-jobservice | ||
version: 0.2.15 | ||
version: 0.2.16 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
infra/charts/feast-spark/charts/feast-jobservice/templates/whitelist.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{{- if .Values.whitelist.enabled }} | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: {{ template "feast-jobservice.fullname" . }}-whitelist | ||
namespace: {{ .Release.Namespace }} | ||
labels: | ||
app: {{ template "feast-jobservice.name" . }} | ||
component: jobservice | ||
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} | ||
release: {{ .Release.Name }} | ||
heritage: {{ .Release.Service }} | ||
data: | ||
whitelist.txt: | | ||
{{- range $featureTable := .Values.whitelist.featureTables }} | ||
{{ $featureTable }} | ||
{{- end }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import tempfile | ||
|
||
from feast import Client | ||
from feast_spark import Client as JobClient | ||
from feast_spark.job_service import JobServiceServicer | ||
|
||
|
||
def test_feature_table_default_whitelist(): | ||
feast_client = Client() | ||
job_client = JobClient(feast_client) | ||
job_servicer = JobServiceServicer(job_client) | ||
assert job_servicer.is_feature_table_whitelisted("some project", "some table") | ||
|
||
|
||
def test_feature_table_whitelist(): | ||
with tempfile.NamedTemporaryFile() as tmp: | ||
tmp.writelines([b"project1:table1\n", b"project1:table2"]) | ||
tmp.seek(0) | ||
feast_client = Client(whitelisted_feature_tables_path=tmp.name) | ||
job_client = JobClient(feast_client) | ||
job_servicer = JobServiceServicer(job_client) | ||
assert not job_servicer.is_feature_table_whitelisted("project2", "table1") | ||
assert job_servicer.is_feature_table_whitelisted("project1", "table1") |