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

[YUNIKORN-2135] Add integration test code coverage #164

Closed
wants to merge 1 commit into from
Closed
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
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,19 @@ spec:
- name: admission-controller-secrets
mountPath: /run/secrets/webhook
readOnly: true
{{- if .Values.enableGoCoverDir }}
- name: go-cover-dir
mountPath: /go-cover-dir/
{{- end }}
env:
- name: NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
{{- if .Values.enableGoCoverDir }}
- name: GOCOVERDIR
value: /go-cover-dir
{{- end }}
ports:
- containerPort: 9089
name: webhook-api
Expand All @@ -118,4 +126,10 @@ spec:
- name: admission-controller-secrets
secret:
secretName: admission-controller-secrets
{{- if .Values.enableGoCoverDir }}
- name: go-cover-dir
hostPath:
path: /go-cover-dir/
type: DirectoryOrCreate
{{- end }}
{{ end }}
14 changes: 14 additions & 0 deletions helm-charts/yunikorn/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,13 @@ spec:
valueFrom:
fieldRef:
fieldPath: metadata.namespace
{{- if .Values.enableGoCoverDir }}
- name: GOCOVERDIR
value: /go-cover-dir
volumeMounts:
- name: go-cover-dir
mountPath: /go-cover-dir/
{{- end }}
resources:
{{- toYaml .Values.resources | nindent 12 }}
- name: yunikorn-scheduler-web
Expand All @@ -104,3 +111,10 @@ spec:
protocol: TCP
resources:
{{- toYaml .Values.web.resources | nindent 12 }}
{{- if .Values.enableGoCoverDir }}
volumes:
- name: go-cover-dir
hostPath:
path: /go-cover-dir/
type: DirectoryOrCreate
{{- end }}
Comment on lines +115 to +120
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If follow this approach, I believe we'll need extra code somewhere which fetches the results from the Docker containers if we want to automate this, correct? Because we won't have it right away on the host filesystem. I guess we need a docker cp somewhere.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 changes: 2 additions & 0 deletions helm-charts/yunikorn/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -124,3 +124,5 @@ enableSchedulerPlugin: false

podLabels: {}
podAnnotations: {}

enableGoCoverDir: false