Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

incresaed cleanup operator time #184

Merged
merged 18 commits into from
Oct 31, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 45 additions & 0 deletions chart-infra/templates/cleanup-operator-roles.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
apiVersion: v1
kind: ServiceAccount
metadata:
name: cleanup-operator
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: cleanup-operator
rules:
- apiGroups: [""]
resources:
- pods
verbs:
- get
- list
- watch
- delete
- apiGroups: ["batch", "extensions"]
resources:
- jobs
verbs:
- get
- list
- watch
- delete
- apiGroups: ["apps"]
resources:
- deployments
- deployments/scale
verbs:
- get
- patch
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: cleanup-operator
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: cleanup-operator
subjects:
- kind: ServiceAccount
name: cleanup-operator
92 changes: 0 additions & 92 deletions chart-infra/templates/kube-cleanup-operator-deployment.yaml

This file was deleted.

21 changes: 21 additions & 0 deletions chart-infra/templates/kubernetes-event-exporter-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: event-exporter-cfg
namespace: {{.Release.Namespace}}
data:
config.yaml: |
logLevel: info
logFormat: json
route:
routes:
- match:
- kind: "Pod"
receiver: "cleanup"
receivers:
- name: "cleanup"
webhook:
endpoint: "https://api-{{ .Values.sandboxId }}.scp-staging.biomage.net/v1/kubernetesEvents"
headers:
User-Agent: kube-event-exporter 1.0

31 changes: 31 additions & 0 deletions chart-infra/templates/kubernetes-event-exporter-deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: event-exporter
namespace: {{ .Release.Namespace }}
spec:
replicas: 1
template:
metadata:
labels:
app: event-exporter
version: v1
spec:
serviceAccountName: event-exporter
containers:
- name: event-exporter
image: ghcr.io/opsgenie/kubernetes-event-exporter:v0.10
imagePullPolicy: IfNotPresent
args:
- -conf=/data/config.yaml
volumeMounts:
- mountPath: /data
name: cfg
volumes:
- name: cfg
configMap:
name: event-exporter-cfg
selector:
matchLabels:
app: event-exporter
version: v1
18 changes: 18 additions & 0 deletions chart-infra/templates/kubernetes-event-exporter-roles.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
apiVersion: v1
kind: ServiceAccount
metadata:
namespace: {{.Release.Namespace}}
name: event-exporter
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: event-exporter
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: view
subjects:
- kind: ServiceAccount
namespace: {{.Release.Namespace}}
name: event-exporter
1 change: 1 addition & 0 deletions pipeline-runner/R/gem2s-7-upload_to_aws.R
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ upload_to_aws <- function(input, pipeline_config, prev_out) {
fpath <- file.path(tempdir(), 'experiment.rds')
saveRDS(scdata, fpath, compress = FALSE)

# can only upload up to 50Gb because part numbers can be any number from 1 to 10,000, inclusive.
put_object_in_s3_multipart(pipeline_config,
bucket = pipeline_config$source_bucket,
object = fpath,
Expand Down
1 change: 1 addition & 0 deletions pipeline-runner/R/handle_data.R
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ send_output_to_api <- function(pipeline_config, input, plot_data_keys, output) {

msg <- list(
experimentId = input$experimentId,
taskName = input$taskName,
input = input,
output = list(
bucket = pipeline_config$results_bucket,
Expand Down
2 changes: 1 addition & 1 deletion pipeline-runner/init.R
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ init <- function() {
cause = error_txt
)

send_pipeline_fail_update(pipeline_config, input_parse$experimentId, input_parse$processName, "Error message placeholder")
send_pipeline_fail_update(pipeline_config, input_parse$experimentId, input_parse$processName, error_txt)

message("Sent task failure to state machine task: ", taskToken)
message("recovered from error:", e$message)
Expand Down