Skip to content

Commit

Permalink
Merge pull request #19 from FNNDSC/dev
Browse files Browse the repository at this point in the history
Support adding of podAnnotations for linkerd
  • Loading branch information
jennydaman authored Apr 4, 2024
2 parents 2f64c07 + 46c9ff8 commit 25b15ed
Show file tree
Hide file tree
Showing 8 changed files with 56 additions and 13 deletions.
2 changes: 1 addition & 1 deletion charts/chris/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ keywords:
icon: ./logo_chris.png

type: application
version: "0.10.2"
version: "0.11.0"
appVersion: "5.0.0"

maintainers:
Expand Down
4 changes: 2 additions & 2 deletions charts/chris/templates/server.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ spec:
template:
metadata:
name: {{ .Release.Name }}-server
{{- with .Values.podAnnotations }}
{{- with .Values.cube.server.podAnnotations }}
annotations:
{{- toYaml . | nindent 8 }}
{{- end }}
Expand Down Expand Up @@ -74,4 +74,4 @@ spec:
targetPort: 8000
{{- if .Values.cube.server.service.nodePort }}
nodePort: {{ .Values.cube.server.service.nodePort }}
{{- end }}
{{- end }}
1 change: 1 addition & 0 deletions charts/chris/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ cube:
# nodePort:
## nodePortHost does nothing. It is simply used to print the URL of CUBE in the NOTES
# nodePortHost:
podAnnotations: {}
## resources for the HTTP server (WSGI).
## Default values should be okay. About 256Mi of memory is needed per idle worker.
resources:
Expand Down
27 changes: 27 additions & 0 deletions extra/pfdcm-linkerd-service-profile.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
apiVersion: linkerd.io/v1alpha2
kind: ServiceProfile
metadata:
name: name-needs-to-be-changed
namespace: chris
labels:
app.kubernetes.io/part-of: chris
spec:
routes:
- name: '/api/v1/PACS/thread/pypx/'
condition:
pathRegex: '/api/v1/PACS/thread/pypx/'
method: POST
isRetryable: true
timeout: 10s
- name: '/api/v1/PACS/sync/pypx/'
condition:
pathRegex: '/api/v1/PACS/sync/pypx/'
method: POST
isRetryable: true
timeout: 10s
# https://linkerd.io/2.15/reference/service-profiles/#retry-budget
retryBudget:
retryRatio: 0.2
minRetriesPerSecond: 10
ttl: 10s

16 changes: 15 additions & 1 deletion testing/default-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ cube:
service:
type: NodePort
nodePort: 32000
podAnnotations:
linkerd.io/inject: enabled
resources:
limits:
cpu: 1
Expand All @@ -18,6 +20,14 @@ cube:
config:
GUNICORN_CMD_ARGS: "--workers=4 --timeout=3600"

postgresql:
primary:
podAnnotations:
linkerd.io/inject: enable
service:
annotations:
config.linkerd.io/opaque-ports: "5432"

pfcon:
storage:
size: 10Gi
Expand All @@ -27,6 +37,8 @@ pfdcm:
service:
type: NodePort
nodePort: 32001
podAnnotations:
linkerd.io/inject: enabled
listener:
service:
type: NodePort
Expand All @@ -39,15 +51,17 @@ pfdcm:
- name: OTEL_RESOURCE_ATTRIBUTES
value: service.name=oxidicom
- name: OTEL_EXPORTER_OTLP_ENDPOINT
value: http://tempo.grafana.svc.cluster.local:4318
value: http://otel-collector-opentelemetry-collector.observe.svc.cluster.local:4318
resources:
limits:
cpu: 500m
memory: 2Gi
requests:
cpu: 500m
memory: 2Gi

orthanc:
enabled: true
service:
type: NodePort
nodePort: 32003
Expand Down
7 changes: 7 additions & 0 deletions testing/justfile
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,13 @@ observe:
kubectl wait --for=condition=ready -n observe pod -l app.kubernetes.io/name=grafana --timeout=300s
helm upgrade --install -n observe -f observe/opentelemetry-collector.yaml otel-collector open-telemetry/opentelemetry-collector

linkerd:
linkerd check --pre
linkerd install --crds | kubectl apply -f -
linkerd install | kubectl apply -f -
linkerd viz install | kubectl apply -f -
linkerd check

# Helper Functions
# --------------------------------------------------------------------------------

Expand Down
4 changes: 2 additions & 2 deletions testing/observe/opentelemetry-collector.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ presets:
extractAllPodAnnotations: false
# See https://opentelemetry.io/docs/kubernetes/collector/components/#kubeletstats-receiver for details on the receiver.
kubeletMetrics:
enabled: true
# The kube-prometheus-stack is already collecting this data.
enabled: false
# See https://opentelemetry.io/docs/kubernetes/collector/components/#kubernetes-objects-receiver for details on the receiver.
kubernetesEvents:
enabled: false
Expand Down Expand Up @@ -61,7 +62,6 @@ config:
endpoint: ${env:MY_POD_IP}:4318
kubeletstats:
insecure_skip_verify: true

# prometheus:
# config:
# scrape_configs:
Expand Down
8 changes: 1 addition & 7 deletions testing/observe/prom-stack.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
# TODO replace with Grafana and Mimir

# disable most stuff, we get metrics from the OpenTelemetry collector instead.
defaultRules:
create: false
kubernetesServiceMonitors:
enabled: false
# Consider replacing kube-prometheus-stack with just Grafana and Mimir?

alertmanager:
enabled: false
Expand Down

0 comments on commit 25b15ed

Please sign in to comment.