279 lines
9.1 KiB
YAML
279 lines
9.1 KiB
YAML
{
|
|
"apiVersion": "v1",
|
|
"kind": "List",
|
|
"items": [
|
|
{
|
|
"apiVersion": "batch/v1",
|
|
"kind": "Job",
|
|
"metadata": {
|
|
"name": "hwlab-openfga-migrate",
|
|
"namespace": "hwlab-v03",
|
|
"labels": {
|
|
"app.kubernetes.io/name": "hwlab-openfga",
|
|
"app.kubernetes.io/part-of": "hwlab",
|
|
"hwlab.pikastech.local/component": "authorization",
|
|
"hwlab.pikastech.local/environment": "v03",
|
|
"hwlab.pikastech.local/gitops-target": "v03",
|
|
"hwlab.pikastech.local/profile": "v03",
|
|
"hwlab.pikastech.local/service-id": "hwlab-openfga",
|
|
"hwlab.pikastech.local/source-commit": "0cd238c795f2cfe5356a42bd5838f9a33338a97b"
|
|
},
|
|
"annotations": {
|
|
"hwlab.pikastech.local/rendered-by": "scripts/gitops-render.mjs",
|
|
"argocd.argoproj.io/hook": "Sync",
|
|
"argocd.argoproj.io/sync-wave": "1",
|
|
"argocd.argoproj.io/hook-delete-policy": "BeforeHookCreation,HookSucceeded"
|
|
}
|
|
},
|
|
"spec": {
|
|
"backoffLimit": 3,
|
|
"template": {
|
|
"metadata": {
|
|
"labels": {
|
|
"app.kubernetes.io/name": "hwlab-openfga",
|
|
"app.kubernetes.io/part-of": "hwlab",
|
|
"hwlab.pikastech.local/component": "authorization",
|
|
"hwlab.pikastech.local/environment": "v03",
|
|
"hwlab.pikastech.local/gitops-target": "v03",
|
|
"hwlab.pikastech.local/profile": "v03",
|
|
"hwlab.pikastech.local/service-id": "hwlab-openfga",
|
|
"hwlab.pikastech.local/source-commit": "0cd238c795f2cfe5356a42bd5838f9a33338a97b"
|
|
},
|
|
"annotations": {
|
|
"hwlab.pikastech.local/rendered-by": "scripts/gitops-render.mjs"
|
|
}
|
|
},
|
|
"spec": {
|
|
"restartPolicy": "OnFailure",
|
|
"containers": [
|
|
{
|
|
"name": "openfga-migrate",
|
|
"image": "127.0.0.1:5000/hwlab/openfga:v1.17.0",
|
|
"imagePullPolicy": "IfNotPresent",
|
|
"args": [
|
|
"migrate"
|
|
],
|
|
"env": [
|
|
{
|
|
"name": "OPENFGA_DATASTORE_ENGINE",
|
|
"value": "postgres"
|
|
},
|
|
{
|
|
"name": "OPENFGA_DATASTORE_URI",
|
|
"valueFrom": {
|
|
"secretKeyRef": {
|
|
"name": "hwlab-v03-openfga",
|
|
"key": "datastore-uri"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "OPENFGA_AUTHN_METHOD",
|
|
"value": "preshared"
|
|
},
|
|
{
|
|
"name": "OPENFGA_AUTHN_PRESHARED_KEYS",
|
|
"valueFrom": {
|
|
"secretKeyRef": {
|
|
"name": "hwlab-v03-openfga",
|
|
"key": "authn-preshared-key"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "OPENFGA_PLAYGROUND_ENABLED",
|
|
"value": "false"
|
|
},
|
|
{
|
|
"name": "OPENFGA_HTTP_ADDR",
|
|
"value": "0.0.0.0:8080"
|
|
},
|
|
{
|
|
"name": "OPENFGA_GRPC_ADDR",
|
|
"value": "0.0.0.0:8081"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"apiVersion": "apps/v1",
|
|
"kind": "Deployment",
|
|
"metadata": {
|
|
"name": "hwlab-openfga",
|
|
"namespace": "hwlab-v03",
|
|
"labels": {
|
|
"app.kubernetes.io/name": "hwlab-openfga",
|
|
"app.kubernetes.io/part-of": "hwlab",
|
|
"hwlab.pikastech.local/component": "authorization",
|
|
"hwlab.pikastech.local/environment": "v03",
|
|
"hwlab.pikastech.local/gitops-target": "v03",
|
|
"hwlab.pikastech.local/profile": "v03",
|
|
"hwlab.pikastech.local/service-id": "hwlab-openfga",
|
|
"hwlab.pikastech.local/source-commit": "0cd238c795f2cfe5356a42bd5838f9a33338a97b"
|
|
},
|
|
"annotations": {
|
|
"hwlab.pikastech.local/rendered-by": "scripts/gitops-render.mjs",
|
|
"argocd.argoproj.io/sync-wave": "2"
|
|
}
|
|
},
|
|
"spec": {
|
|
"replicas": 1,
|
|
"selector": {
|
|
"matchLabels": {
|
|
"app.kubernetes.io/name": "hwlab-openfga"
|
|
}
|
|
},
|
|
"template": {
|
|
"metadata": {
|
|
"labels": {
|
|
"app.kubernetes.io/name": "hwlab-openfga",
|
|
"app.kubernetes.io/part-of": "hwlab",
|
|
"hwlab.pikastech.local/component": "authorization",
|
|
"hwlab.pikastech.local/environment": "v03",
|
|
"hwlab.pikastech.local/gitops-target": "v03",
|
|
"hwlab.pikastech.local/profile": "v03",
|
|
"hwlab.pikastech.local/service-id": "hwlab-openfga",
|
|
"hwlab.pikastech.local/source-commit": "0cd238c795f2cfe5356a42bd5838f9a33338a97b"
|
|
},
|
|
"annotations": {
|
|
"hwlab.pikastech.local/rendered-by": "scripts/gitops-render.mjs"
|
|
}
|
|
},
|
|
"spec": {
|
|
"containers": [
|
|
{
|
|
"name": "openfga",
|
|
"image": "127.0.0.1:5000/hwlab/openfga:v1.17.0",
|
|
"imagePullPolicy": "IfNotPresent",
|
|
"args": [
|
|
"run"
|
|
],
|
|
"env": [
|
|
{
|
|
"name": "OPENFGA_DATASTORE_ENGINE",
|
|
"value": "postgres"
|
|
},
|
|
{
|
|
"name": "OPENFGA_DATASTORE_URI",
|
|
"valueFrom": {
|
|
"secretKeyRef": {
|
|
"name": "hwlab-v03-openfga",
|
|
"key": "datastore-uri"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "OPENFGA_AUTHN_METHOD",
|
|
"value": "preshared"
|
|
},
|
|
{
|
|
"name": "OPENFGA_AUTHN_PRESHARED_KEYS",
|
|
"valueFrom": {
|
|
"secretKeyRef": {
|
|
"name": "hwlab-v03-openfga",
|
|
"key": "authn-preshared-key"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "OPENFGA_PLAYGROUND_ENABLED",
|
|
"value": "false"
|
|
},
|
|
{
|
|
"name": "OPENFGA_HTTP_ADDR",
|
|
"value": "0.0.0.0:8080"
|
|
},
|
|
{
|
|
"name": "OPENFGA_GRPC_ADDR",
|
|
"value": "0.0.0.0:8081"
|
|
}
|
|
],
|
|
"ports": [
|
|
{
|
|
"name": "http",
|
|
"containerPort": 8080
|
|
},
|
|
{
|
|
"name": "grpc",
|
|
"containerPort": 8081
|
|
}
|
|
],
|
|
"readinessProbe": {
|
|
"httpGet": {
|
|
"path": "/healthz",
|
|
"port": "http"
|
|
},
|
|
"initialDelaySeconds": 3,
|
|
"periodSeconds": 10
|
|
},
|
|
"livenessProbe": {
|
|
"httpGet": {
|
|
"path": "/healthz",
|
|
"port": "http"
|
|
},
|
|
"initialDelaySeconds": 15,
|
|
"periodSeconds": 20
|
|
},
|
|
"resources": {
|
|
"requests": {
|
|
"cpu": "50m",
|
|
"memory": "128Mi"
|
|
},
|
|
"limits": {
|
|
"cpu": "500m",
|
|
"memory": "512Mi"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"apiVersion": "v1",
|
|
"kind": "Service",
|
|
"metadata": {
|
|
"name": "hwlab-openfga",
|
|
"namespace": "hwlab-v03",
|
|
"labels": {
|
|
"app.kubernetes.io/name": "hwlab-openfga",
|
|
"app.kubernetes.io/part-of": "hwlab",
|
|
"hwlab.pikastech.local/component": "authorization",
|
|
"hwlab.pikastech.local/environment": "v03",
|
|
"hwlab.pikastech.local/gitops-target": "v03",
|
|
"hwlab.pikastech.local/profile": "v03",
|
|
"hwlab.pikastech.local/service-id": "hwlab-openfga",
|
|
"hwlab.pikastech.local/source-commit": "0cd238c795f2cfe5356a42bd5838f9a33338a97b"
|
|
},
|
|
"annotations": {
|
|
"hwlab.pikastech.local/rendered-by": "scripts/gitops-render.mjs",
|
|
"argocd.argoproj.io/sync-wave": "2"
|
|
}
|
|
},
|
|
"spec": {
|
|
"type": "ClusterIP",
|
|
"selector": {
|
|
"app.kubernetes.io/name": "hwlab-openfga"
|
|
},
|
|
"ports": [
|
|
{
|
|
"name": "http",
|
|
"port": 8080,
|
|
"targetPort": "http"
|
|
},
|
|
{
|
|
"name": "grpc",
|
|
"port": 8081,
|
|
"targetPort": "grpc"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
}
|