Skip to content

Commit

Permalink
Merge branch 'dev' into yash/scale
Browse files Browse the repository at this point in the history
  • Loading branch information
yashgorana authored Feb 7, 2024
2 parents 903df9c + 2431411 commit b6f563b
Show file tree
Hide file tree
Showing 23 changed files with 615 additions and 377 deletions.
21 changes: 17 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,14 +81,27 @@ SYFT_VERSION="<paste the chart version number>"
#### 4. Provisioning Helm Charts

```sh
helm install my-domain openmined/syft --version $SYFT_VERSION --namespace syft --create-namespace --set ingress.ingressClass=traefik
helm install my-domain openmined/syft --version $SYFT_VERSION --namespace syft --create-namespace --set ingress.className="traefik"
```

### Azure or GCP Ingress
### Ingress Controllers

For Azure AKS

```sh
helm install ... --set ingress.className="azure-application-gateway"
```
helm install ... --set ingress.ingressClass="azure/application-gateway"
helm install ... --set ingress.ingressClass="gce"

For AWS EKS

```sh
helm install ... --set ingress.className="alb"
```

For Google GKE we need the [`gce` annotation](https://cloud.google.com/kubernetes-engine/docs/how-to/load-balance-ingress#create-ingress) annotation.

```sh
helm install ... --set ingress.class="gce"
```

## Deploy to a Container Engine or Cloud
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@
"metadata": {},
"source": [
"```bash\n",
"helm install my-domain openmined/syft --version $SYFT_VERSION --namespace syft --create-namespace --set ingress.ingressClass=traefik\n",
"helm install my-domain openmined/syft --version $SYFT_VERSION --namespace syft --create-namespace --set ingress.className=traefik\n",
"```"
]
},
Expand Down
4 changes: 2 additions & 2 deletions packages/grid/devspace.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ deployments:
syft:
registry: ${CONTAINER_REGISTRY}
version: dev-${DEVSPACE_TIMESTAMP}
workerBuilds:
mountInBackend: true
registry:
maxStorage: "5Gi"
node:
settings:
nodeName: ${NODE_NAME}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ apiVersion: v1
kind: ServiceAccount
metadata:
name: backend-service-account
namespace: {{ .Release.Namespace }}
labels:
app.kubernetes.io/name: {{ .Chart.Name }}
app.kubernetes.io/version: {{ .Chart.AppVersion }}
Expand All @@ -14,7 +13,6 @@ apiVersion: v1
kind: Secret
metadata:
name: backend-service-secret
namespace: {{ .Release.Namespace }}
annotations:
kubernetes.io/service-account.name: "backend-service-account"
labels:
Expand All @@ -29,7 +27,6 @@ apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: backend-service-role
namespace: {{ .Release.Namespace }}
labels:
app.kubernetes.io/name: {{ .Chart.Name }}
app.kubernetes.io/version: {{ .Chart.AppVersion }}
Expand All @@ -53,15 +50,13 @@ apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: backend-service-role-binding
namespace: {{ .Release.Namespace }}
labels:
app.kubernetes.io/name: {{ .Chart.Name }}
app.kubernetes.io/version: {{ .Chart.AppVersion }}
app.kubernetes.io/managed-by: Helm
subjects:
- kind: ServiceAccount
name: backend-service-account
namespace: {{ .Release.Namespace }}
roleRef:
kind: Role
name: backend-service-role
Expand Down
12 changes: 0 additions & 12 deletions packages/grid/helm/syft/templates/backend-statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -136,12 +136,6 @@ spec:
name: credentials-data
readOnly: false
subPath: credentials-data
{{- if .Values.workerBuilds.mountInBackend }}
# mount for debugging and inspection of worker-build volume
- mountPath: /root/data/images/
name: worker-builds
readOnly: true
{{- end }}
dnsConfig: null
ephemeralContainers: null
hostAliases: null
Expand All @@ -155,12 +149,6 @@ spec:
terminationGracePeriodSeconds: 5
tolerations: null
topologySpreadConstraints: null
{{- if .Values.workerBuilds.mountInBackend }}
volumes:
- name: worker-builds
persistentVolumeClaim:
claimName: worker-builds
{{- end }}
volumeClaimTemplates:
- metadata:
labels:
Expand Down
2 changes: 1 addition & 1 deletion packages/grid/helm/syft/templates/frontend-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ spec:
command: null
env:
- name: VERSION
value: {{ .Values.syft.version }}
value: "{{ .Values.syft.version }}"
- name: VERSION_HASH
value: {{ .Values.node.settings.versionHash }}
- name: NODE_TYPE
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,14 @@ metadata:
app.kubernetes.io/component: ingress
app.kubernetes.io/managed-by: Helm
name: grid-stack-ingress
{{- if .Values.ingress.class }}
annotations:
kubernetes.io/ingress.class: {{ .Values.ingress.class }}
{{- end }}
spec:
ingressClassName: {{ .Values.ingress.ingressClass }}
{{- if .Values.ingress.className }}
ingressClassName: {{ .Values.ingress.className }}
{{- end }}
defaultBackend:
service:
name: proxy
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,14 @@ metadata:
app.kubernetes.io/component: ingress
app.kubernetes.io/managed-by: Helm
name: grid-stack-ingress-tls
{{- if .Values.ingress.class }}
annotations:
kubernetes.io/ingress.class: {{ .Values.ingress.class }}
{{- end }}
spec:
ingressClassName: {{ .Values.ingress.ingressClass }}
{{- if .Values.ingress.className }}
ingressClassName: {{ .Values.ingress.className }}
{{- end }}
defaultBackend:
service:
name: proxy
Expand Down
17 changes: 17 additions & 0 deletions packages/grid/helm/syft/templates/registry-service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
apiVersion: v1
kind: Service
metadata:
name: registry
labels:
app.kubernetes.io/name: {{ .Chart.Name }}
app.kubernetes.io/version: {{ .Chart.AppVersion }}
app.kubernetes.io/managed-by: Helm
spec:
type: ClusterIP
ports:
- protocol: TCP
port: 80
targetPort: 5000
selector:
app.kubernetes.io/name: {{ .Chart.Name }}
app.kubernetes.io/component: registry
47 changes: 47 additions & 0 deletions packages/grid/helm/syft/templates/registry-statefulset.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: registry
labels:
app.kubernetes.io/name: {{ .Chart.Name }}
app.kubernetes.io/version: {{ .Chart.AppVersion }}
app.kubernetes.io/component: registry
app.kubernetes.io/managed-by: Helm
spec:
replicas: 1
selector:
matchLabels:
app.kubernetes.io/name: {{ .Chart.Name }}
app.kubernetes.io/component: registry
app.kubernetes.io/managed-by: Helm
template:
metadata:
labels:
app.kubernetes.io/name: {{ .Chart.Name }}
app.kubernetes.io/component: registry
app.kubernetes.io/managed-by: Helm
spec:
containers:
- image: registry:2
name: registry
env:
- name: REGISTRY_STORAGE_DELETE_ENABLED
value: "true"
ports:
- containerPort: 5000
volumeMounts:
- mountPath: /var/lib/registry
name: registry-data
volumeClaimTemplates:
- metadata:
name: registry-data
labels:
app.kubernetes.io/name: {{ .Chart.Name }}
app.kubernetes.io/component: registry
app.kubernetes.io/managed-by: Helm
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: {{ .Values.registry.maxStorage }}
15 changes: 0 additions & 15 deletions packages/grid/helm/syft/templates/worker-builds-pvc.yaml

This file was deleted.

22 changes: 13 additions & 9 deletions packages/grid/helm/syft/values.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
# Default values for syft.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.

secrets:
syft: syft-default-secret
mongo: mongo-default-secret
Expand All @@ -28,9 +24,8 @@ seaweedfs:
queue:
port: 5556

workerBuilds:
registry:
maxStorage: "10Gi"
mountInBackend: false

syft:
registry: "docker.io"
Expand All @@ -49,7 +44,16 @@ node:
inMemoryWorkers: false
defaultWorkerPoolCount: 1

# ----------------------------------------
# For Azure
# className: "azure-application-gateway"
# ----------------------------------------
# For AWS
# className: "alb"
# ----------------------------------------
# For GCE, https://cloud.google.com/kubernetes-engine/docs/how-to/load-balance-ingress#create-ingress
# class: "gce"
# ----------------------------------------
ingress:
ingressClass: ""
# ingressClass: "azure/application-gateway"
# ingressClass: "gce"
class: null
className: null
21 changes: 17 additions & 4 deletions packages/syft/PYPI.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,14 +78,27 @@ SYFT_VERSION="<paste the chart version number>"
#### 4. Provisioning Helm Charts

```sh
helm install my-domain openmined/syft --version $SYFT_VERSION --namespace syft --create-namespace --set ingress.ingressClass=traefik
helm install my-domain openmined/syft --version $SYFT_VERSION --namespace syft --create-namespace --set ingress.className="traefik"
```

### Azure or GCP Ingress
### Ingress Controllers

For Azure AKS

```sh
helm install ... --set ingress.className="azure-application-gateway"
```
helm install ... --set ingress.ingressClass="azure/application-gateway"
helm install ... --set ingress.ingressClass="gce"

For AWS EKS

```sh
helm install ... --set ingress.className="alb"
```

For Google GKE we need the [`gce` annotation](https://cloud.google.com/kubernetes-engine/docs/how-to/load-balance-ingress#create-ingress) annotation.

```sh
helm install ... --set ingress.class="gce"
```

## Deploy to a Container Engine or Cloud
Expand Down
2 changes: 1 addition & 1 deletion packages/syft/setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ syft =
numpy>=1.23.5,<=1.24.4
pandas==1.5.3
docker==6.1.3
kr8s==0.13.0
kr8s==0.13.1
PyYAML==6.0.1
azure-storage-blob==12.19

Expand Down
Loading

0 comments on commit b6f563b

Please sign in to comment.