Skip to content

Commit

Permalink
FIx multitenancy and component-replicas test (#1006)
Browse files Browse the repository at this point in the history
Co-authored-by: Andreas Gerstmayr <[email protected]>
  • Loading branch information
IshwarKanse and andreasgerstmayr authored Aug 9, 2024
1 parent 020ed7d commit 3023b13
Show file tree
Hide file tree
Showing 8 changed files with 124 additions and 120 deletions.
4 changes: 2 additions & 2 deletions tests/e2e-openshift/component-replicas/install-otelcol.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ spec:
exporters:
otlp:
endpoint: tempo-simplest-gateway.chainsaw-replicas.svc.cluster.local:8090
endpoint: tempo-cmpreps-gateway.chainsaw-replicas.svc.cluster.local:8090
tls:
insecure: false
ca_file: "/var/run/secrets/kubernetes.io/serviceaccount/service-ca.crt"
Expand All @@ -32,7 +32,7 @@ spec:
headers:
X-Scope-OrgID: "dev"
otlphttp:
endpoint: https://tempo-simplest-gateway.chainsaw-replicas.svc.cluster.local:8080/api/traces/v1/dev
endpoint: https://tempo-cmpreps-gateway.chainsaw-replicas.svc.cluster.local:8080/api/traces/v1/dev
tls:
insecure: false
ca_file: "/var/run/secrets/kubernetes.io/serviceaccount/service-ca.crt"
Expand Down
113 changes: 57 additions & 56 deletions tests/e2e-openshift/component-replicas/install-tempo-assert.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@ kind: Secret
metadata:
labels:
app.kubernetes.io/component: gateway
app.kubernetes.io/instance: simplest
app.kubernetes.io/instance: cmpreps
app.kubernetes.io/managed-by: tempo-operator
app.kubernetes.io/name: tempo
name: tempo-simplest-gateway
name: tempo-cmpreps-gateway
namespace: chainsaw-replicas
ownerReferences:
- apiVersion: tempo.grafana.com/v1alpha1
blockOwnerDeletion: true
controller: true
kind: TempoStack
name: simplest
name: cmpreps
type: Opaque
---
apiVersion: v1
Expand All @@ -26,67 +26,67 @@ kind: ConfigMap
metadata:
labels:
app.kubernetes.io/component: gateway
app.kubernetes.io/instance: simplest
app.kubernetes.io/instance: cmpreps
app.kubernetes.io/managed-by: tempo-operator
app.kubernetes.io/name: tempo
name: tempo-simplest-gateway
name: tempo-cmpreps-gateway
namespace: chainsaw-replicas
ownerReferences:
- apiVersion: tempo.grafana.com/v1alpha1
blockOwnerDeletion: true
controller: true
kind: TempoStack
name: simplest
name: cmpreps
---
apiVersion: v1
kind: ConfigMap
metadata:
labels:
app.kubernetes.io/component: gateway
app.kubernetes.io/instance: simplest
app.kubernetes.io/instance: cmpreps
app.kubernetes.io/managed-by: tempo-operator
app.kubernetes.io/name: tempo
annotations:
service.beta.openshift.io/inject-cabundle: "true"
name: tempo-simplest-gateway-cabundle
name: tempo-cmpreps-gateway-cabundle
namespace: chainsaw-replicas
ownerReferences:
- apiVersion: tempo.grafana.com/v1alpha1
blockOwnerDeletion: true
controller: true
kind: TempoStack
name: simplest
name: cmpreps
---
apiVersion: v1
automountServiceAccountToken: true
kind: ServiceAccount
metadata:
annotations:
serviceaccounts.openshift.io/oauth-redirectreference.dev: '{"kind":"OAuthRedirectReference","apiVersion":"v1","reference":{"kind":"Route","name":"tempo-simplest-gateway"}}'
serviceaccounts.openshift.io/oauth-redirectreference.prod: '{"kind":"OAuthRedirectReference","apiVersion":"v1","reference":{"kind":"Route","name":"tempo-simplest-gateway"}}'
serviceaccounts.openshift.io/oauth-redirectreference.dev: '{"kind":"OAuthRedirectReference","apiVersion":"v1","reference":{"kind":"Route","name":"tempo-cmpreps-gateway"}}'
serviceaccounts.openshift.io/oauth-redirectreference.prod: '{"kind":"OAuthRedirectReference","apiVersion":"v1","reference":{"kind":"Route","name":"tempo-cmpreps-gateway"}}'
labels:
app.kubernetes.io/component: gateway
app.kubernetes.io/instance: simplest
app.kubernetes.io/instance: cmpreps
app.kubernetes.io/managed-by: tempo-operator
app.kubernetes.io/name: tempo
name: tempo-simplest-gateway
name: tempo-cmpreps-gateway
namespace: chainsaw-replicas
ownerReferences:
- apiVersion: tempo.grafana.com/v1alpha1
blockOwnerDeletion: true
controller: true
kind: TempoStack
name: simplest
name: cmpreps
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
labels:
app.kubernetes.io/component: gateway
app.kubernetes.io/instance: simplest
app.kubernetes.io/instance: cmpreps
app.kubernetes.io/managed-by: tempo-operator
app.kubernetes.io/name: tempo
name: tempo-simplest-gateway
name: tempo-cmpreps-gateway
rules:
- apiGroups:
- authentication.k8s.io
Expand All @@ -106,46 +106,46 @@ kind: ClusterRoleBinding
metadata:
labels:
app.kubernetes.io/component: gateway
app.kubernetes.io/instance: simplest
app.kubernetes.io/instance: cmpreps
app.kubernetes.io/managed-by: tempo-operator
app.kubernetes.io/name: tempo
name: tempo-simplest-gateway
name: tempo-cmpreps-gateway
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: tempo-simplest-gateway
name: tempo-cmpreps-gateway
subjects:
- kind: ServiceAccount
name: tempo-simplest-gateway
name: tempo-cmpreps-gateway
---
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app.kubernetes.io/component: gateway
app.kubernetes.io/instance: simplest
app.kubernetes.io/instance: cmpreps
app.kubernetes.io/managed-by: tempo-operator
app.kubernetes.io/name: tempo
name: tempo-simplest-gateway
name: tempo-cmpreps-gateway
namespace: chainsaw-replicas
ownerReferences:
- apiVersion: tempo.grafana.com/v1alpha1
blockOwnerDeletion: true
controller: true
kind: TempoStack
name: simplest
name: cmpreps
spec:
selector:
matchLabels:
app.kubernetes.io/component: gateway
app.kubernetes.io/instance: simplest
app.kubernetes.io/instance: cmpreps
app.kubernetes.io/managed-by: tempo-operator
app.kubernetes.io/name: tempo
template:
metadata:
labels:
app.kubernetes.io/component: gateway
app.kubernetes.io/instance: simplest
app.kubernetes.io/instance: cmpreps
app.kubernetes.io/managed-by: tempo-operator
app.kubernetes.io/name: tempo
spec:
Expand All @@ -154,9 +154,9 @@ spec:
- --traces.tenant-header=x-scope-orgid
- --web.listen=0.0.0.0:8080
- --web.internal.listen=0.0.0.0:8081
- --traces.write.otlpgrpc.endpoint=tempo-simplest-distributor.chainsaw-replicas.svc.cluster.local:4317
- --traces.write.otlphttp.endpoint=https://tempo-simplest-distributor.chainsaw-replicas.svc.cluster.local:4318
- --traces.tempo.endpoint=https://tempo-simplest-query-frontend.chainsaw-replicas.svc.cluster.local:3200
- --traces.write.otlpgrpc.endpoint=tempo-cmpreps-distributor.chainsaw-replicas.svc.cluster.local:4317
- --traces.write.otlphttp.endpoint=https://tempo-cmpreps-distributor.chainsaw-replicas.svc.cluster.local:4318
- --traces.tempo.endpoint=https://tempo-cmpreps-query-frontend.chainsaw-replicas.svc.cluster.local:3200
- --grpc.listen=0.0.0.0:8090
- --rbac.config=/etc/tempo-gateway/cm/rbac.yaml
- --tenants.config=/etc/tempo-gateway/secret/tenants.yaml
Expand All @@ -166,13 +166,14 @@ spec:
- --traces.tls.key-file=/var/run/tls/server/tls.key
- --traces.tls.cert-file=/var/run/tls/server/tls.crt
- --traces.tls.ca-file=/var/run/ca/service-ca.crt
- --traces.tls.watch-certs=true
- --tls.server.cert-file=/etc/tempo-gateway/serving-certs/tls.crt
- --tls.server.key-file=/etc/tempo-gateway/serving-certs/tls.key
- --tls.healthchecks.server-ca-file=/etc/tempo-gateway/cabundle/service-ca.crt
- --tls.healthchecks.server-name=tempo-simplest-gateway.chainsaw-replicas.svc.cluster.local
- --tls.healthchecks.server-name=tempo-cmpreps-gateway.chainsaw-replicas.svc.cluster.local
- --web.healthchecks.url=https://localhost:8080
- --tls.client-auth-type=NoClientCert
- --traces.read.endpoint=https://tempo-simplest-query-frontend.chainsaw-replicas.svc.cluster.local:16686
- --traces.read.endpoint=https://tempo-cmpreps-query-frontend.chainsaw-replicas.svc.cluster.local:16686
livenessProbe:
failureThreshold: 10
httpGet:
Expand Down Expand Up @@ -219,9 +220,9 @@ spec:
readOnly: true
subPath: tenants.yaml
- mountPath: /var/run/ca
name: tempo-simplest-ca-bundle
name: tempo-cmpreps-ca-bundle
- mountPath: /var/run/tls/server
name: tempo-simplest-gateway-mtls
name: tempo-cmpreps-gateway-mtls
- mountPath: /etc/tempo-gateway/serving-certs
name: serving-certs
readOnly: true
Expand Down Expand Up @@ -267,39 +268,39 @@ spec:
resources: {}
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
serviceAccount: tempo-simplest-gateway
serviceAccountName: tempo-simplest-gateway
serviceAccount: tempo-cmpreps-gateway
serviceAccountName: tempo-cmpreps-gateway
terminationGracePeriodSeconds: 30
volumes:
- configMap:
defaultMode: 420
items:
- key: rbac.yaml
path: rbac.yaml
name: tempo-simplest-gateway
name: tempo-cmpreps-gateway
name: rbac
- name: tenant
secret:
defaultMode: 420
items:
- key: tenants.yaml
path: tenants.yaml
secretName: tempo-simplest-gateway
secretName: tempo-cmpreps-gateway
- configMap:
defaultMode: 420
name: tempo-simplest-ca-bundle
name: tempo-simplest-ca-bundle
- name: tempo-simplest-gateway-mtls
name: tempo-cmpreps-ca-bundle
name: tempo-cmpreps-ca-bundle
- name: tempo-cmpreps-gateway-mtls
secret:
defaultMode: 420
secretName: tempo-simplest-gateway-mtls
secretName: tempo-cmpreps-gateway-mtls
- name: serving-certs
secret:
defaultMode: 420
secretName: tempo-simplest-gateway-tls
secretName: tempo-cmpreps-gateway-tls
- configMap:
defaultMode: 420
name: tempo-simplest-gateway-cabundle
name: tempo-cmpreps-gateway-cabundle
name: cabundle
status:
readyReplicas: 1
Expand All @@ -310,46 +311,46 @@ kind: Route
metadata:
labels:
app.kubernetes.io/component: gateway
app.kubernetes.io/instance: simplest
app.kubernetes.io/instance: cmpreps
app.kubernetes.io/managed-by: tempo-operator
app.kubernetes.io/name: tempo
name: tempo-simplest-gateway
name: tempo-cmpreps-gateway
namespace: chainsaw-replicas
ownerReferences:
- apiVersion: tempo.grafana.com/v1alpha1
blockOwnerDeletion: true
controller: true
kind: TempoStack
name: simplest
name: cmpreps
spec:
port:
targetPort: public
tls:
termination: passthrough
to:
kind: Service
name: tempo-simplest-gateway
name: tempo-cmpreps-gateway
weight: 100
wildcardPolicy: None
---
apiVersion: v1
kind: Service
metadata:
annotations:
service.beta.openshift.io/serving-cert-secret-name: tempo-simplest-gateway-tls
service.beta.openshift.io/serving-cert-secret-name: tempo-cmpreps-gateway-tls
labels:
app.kubernetes.io/component: gateway
app.kubernetes.io/instance: simplest
app.kubernetes.io/instance: cmpreps
app.kubernetes.io/managed-by: tempo-operator
app.kubernetes.io/name: tempo
name: tempo-simplest-gateway
name: tempo-cmpreps-gateway
namespace: chainsaw-replicas
ownerReferences:
- apiVersion: tempo.grafana.com/v1alpha1
blockOwnerDeletion: true
controller: true
kind: TempoStack
name: simplest
name: cmpreps
spec:
ports:
- name: grpc-public
Expand All @@ -366,47 +367,47 @@ spec:
targetPort: public
selector:
app.kubernetes.io/component: gateway
app.kubernetes.io/instance: simplest
app.kubernetes.io/instance: cmpreps
app.kubernetes.io/managed-by: tempo-operator
app.kubernetes.io/name: tempo
type: ClusterIP
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: tempo-simplest-compactor
name: tempo-cmpreps-compactor
namespace: chainsaw-replicas
status:
readyReplicas: 1
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: tempo-simplest-distributor
name: tempo-cmpreps-distributor
namespace: chainsaw-replicas
status:
readyReplicas: 1
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: tempo-simplest-querier
name: tempo-cmpreps-querier
namespace: chainsaw-replicas
status:
readyReplicas: 1
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: tempo-simplest-query-frontend
name: tempo-cmpreps-query-frontend
namespace: chainsaw-replicas
status:
readyReplicas: 1
---
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: tempo-simplest-ingester
name: tempo-cmpreps-ingester
namespace: chainsaw-replicas
status:
readyReplicas: 1
2 changes: 1 addition & 1 deletion tests/e2e-openshift/component-replicas/install-tempo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
apiVersion: tempo.grafana.com/v1alpha1
kind: TempoStack
metadata:
name: simplest
name: cmpreps
namespace: chainsaw-replicas
spec:
storage:
Expand Down
Loading

0 comments on commit 3023b13

Please sign in to comment.