Skip to content
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
150 changes: 70 additions & 80 deletions k8s/resource-usage-api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,24 +17,15 @@ spec:
affinity:
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: de-app
operator: In
values:
- resource-usage-api
topologyKey: kubernetes.io/hostname
- labelSelector:
matchExpressions:
- key: de-app
operator: In
values:
- resource-usage-api
topologyKey: kubernetes.io/hostname
restartPolicy: Always
volumes:
- name: localtime
hostPath:
path: /etc/localtime
- name: timezone
configMap:
name: timezone
items:
- key: timezone
path: timezone
- name: service-configs
secret:
secretName: service-configs
Expand All @@ -50,70 +41,69 @@ spec:
- name: nats-configuration
emptyDir: {}
containers:
- name: resource-usage-api
image: harbor.cyverse.org/de/resource-usage-api
resources:
requests:
cpu: "1m"
memory: "128Mi"
ephemeral-storage: "1Gi"
limits:
cpu: "100m"
memory: "256Mi"
ephemeral-storage: "1Gi"
env:
- name: OTEL_TRACES_EXPORTER
valueFrom:
secretKeyRef:
name: configs
key: OTEL_TRACES_EXPORTER
- name: OTEL_EXPORTER_JAEGER_ENDPOINT
valueFrom:
secretKeyRef:
name: configs
key: OTEL_EXPORTER_JAEGER_HTTP_ENDPOINT
- name: DISCOENV_NATS_CLUSTER
valueFrom:
secretKeyRef:
name: configs
key: NATS_URLS
args:
- --log-level
- debug
ports:
- name: listen-port
containerPort: 60000
volumeMounts:
- name: localtime
mountPath: /etc/localtime
readOnly: true
- name: timezone
mountPath: /etc/timezone
subPath: timezone
- name: service-configs
mountPath: /etc/cyverse/de/configs
readOnly: true
- name: nats-client-tls
mountPath: /etc/nats/tls
readOnly: true
- name: nats-services-creds
mountPath: /etc/nats/creds
readOnly: true
- name: nats-configuration
mountPath: /etc/cyverse/de/env
readOnly: true
livenessProbe:
httpGet:
path: /
port: 60000
initialDelaySeconds: 5
periodSeconds: 5
readinessProbe:
httpGet:
path: /
port: 60000
initialDelaySeconds: 5
periodSeconds: 5
- name: resource-usage-api
image: harbor.cyverse.org/de/resource-usage-api
resources:
requests:
cpu: "1m"
memory: "128Mi"
ephemeral-storage: "1Gi"
limits:
cpu: "100m"
memory: "256Mi"
ephemeral-storage: "1Gi"
env:
- name: TZ
valueFrom:
configMapKeyRef:
name: timezone
key: timezone
- name: OTEL_TRACES_EXPORTER
valueFrom:
secretKeyRef:
name: configs
key: OTEL_TRACES_EXPORTER
- name: OTEL_EXPORTER_JAEGER_ENDPOINT
valueFrom:
secretKeyRef:
name: configs
key: OTEL_EXPORTER_JAEGER_HTTP_ENDPOINT
- name: DISCOENV_NATS_CLUSTER
valueFrom:
secretKeyRef:
name: configs
key: NATS_URLS
args:
- --log-level
- debug
ports:
- name: listen-port
containerPort: 60000
volumeMounts:
- name: service-configs
mountPath: /etc/cyverse/de/configs
readOnly: true
- name: nats-client-tls
mountPath: /etc/nats/tls
readOnly: true
- name: nats-services-creds
mountPath: /etc/nats/creds
readOnly: true
- name: nats-configuration
mountPath: /etc/cyverse/de/env
readOnly: true
livenessProbe:
httpGet:
path: /
port: 60000
initialDelaySeconds: 5
periodSeconds: 5
readinessProbe:
httpGet:
path: /
port: 60000
initialDelaySeconds: 5
periodSeconds: 5
---
apiVersion: v1
kind: Service
Expand Down
17 changes: 10 additions & 7 deletions skaffold.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
apiVersion: skaffold/v1
apiVersion: skaffold/v3
kind: Config
metadata:
name: resource-usage-api
deploy:
kubectl:
manifests:
- k8s/resource-usage-api.yml
build:
artifacts:
- image: harbor.cyverse.org/de/resource-usage-api
platforms:
- "linux/amd64"
tagPolicy:
gitCommit: {}
artifacts:
- image: harbor.cyverse.org/de/resource-usage-api
local: {}
manifests:
rawYaml:
- k8s/resource-usage-api.yml
deploy:
kubectl: {}
Loading