Skip to content

Commit

Permalink
add job run logs when running in kubernetes (#1186)
Browse files Browse the repository at this point in the history
  • Loading branch information
alishakawaguchi authored Jan 26, 2024
1 parent 336ee68 commit fabe7ec
Show file tree
Hide file tree
Showing 37 changed files with 3,183 additions and 450 deletions.
1 change: 1 addition & 0 deletions .mockery.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ packages:
interfaces:
UserAccountServiceClient:
JobServiceClient:
JobServiceHandler:
ConnectionServiceClient:
AuthServiceClient:
TransformersServiceClient:
Expand Down
10 changes: 10 additions & 0 deletions backend/charts/api/templates/api-env-vars.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -92,3 +92,13 @@ stringData:

NEOSYNC_CLOUD: {{ .Values.neosyncCloud.enabled | default "false" | quote }}
NEOSYNC_CLOUD_ALLOWED_WORKER_API_KEYS: {{ join "," .Values.neosyncCloud.workerApiKeys }}

KUBERNETES_ENABLED: {{ .Values.kubernetes.enabled | default "false" | quote }}

{{- if and .Values.kubernetes .Values.kubernetes.namespace }}
KUBERNETES_NAMESPACE: {{ .Values.kubernetes.namespace }}
{{- end }}

{{- if and .Values.kubernetes .Values.kubernetes.workerAppName }}
KUBERNETES_WORKER_APP_NAME: {{ .Values.kubernetes.workerAppName }}
{{- end }}
13 changes: 13 additions & 0 deletions backend/charts/api/templates/role-binding.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
namespace: neosync
name: {{ template "neosync-api.fullname" . }}-rolebinding
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: {{ template "neosync-api.fullname" . }}-role
subjects:
- kind: ServiceAccount
name: {{ include "neosync-api.serviceAccountName" . }}
namespace: {{ .Release.Namespace }}
14 changes: 14 additions & 0 deletions backend/charts/api/templates/role.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
namespace: neosync
name: {{ template "neosync-api.fullname" . }}-role
rules:
- apiGroups: [""]
resources:
- pods
- pods/log
verbs:
- get
- list
- watch
13 changes: 9 additions & 4 deletions backend/charts/api/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@ migrations:
resources:
# These are low-usage defaults. Change these depending on your needs.
requests:
cpu: "100m"
memory: "128Mi"
cpu: '100m'
memory: '128Mi'
limits:
cpu: "300m"
memory: "384Mi"
cpu: '300m'
memory: '384Mi'

autoscaling:
enabled: true
Expand Down Expand Up @@ -98,3 +98,8 @@ volumeMounts: []
neosyncCloud:
enabled: false
workerApiKeys: []

kubernetes:
enabled: false
namespace: neosync
workerAppName: neosync-worker
1,029 changes: 636 additions & 393 deletions backend/gen/go/protos/mgmt/v1alpha1/job.pb.go

Large diffs are not rendered by default.

219 changes: 219 additions & 0 deletions backend/gen/go/protos/mgmt/v1alpha1/job.pb.validate.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit fabe7ec

Please sign in to comment.