Add unit tests for KubernetesCluster, Tenant, ServiceInstance, and RegisterClusterHandler
- Implement tests for KubernetesCluster including registration, connectivity status, and error handling. - Create tests for Tenant creation, member management, and status changes. - Add tests for ServiceInstance provisioning and state management. - Introduce RegisterClusterHandler tests to validate registration requests and error scenarios. - Set up project files for new test projects with necessary dependencies.
This commit is contained in:
57
Charts/entkube/templates/web-deployment.yaml
Normal file
57
Charts/entkube/templates/web-deployment.yaml
Normal file
@@ -0,0 +1,57 @@
|
||||
{{- if .Values.web.enabled }}
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: {{ include "entkube.fullname" . }}-web
|
||||
labels:
|
||||
{{- include "entkube.labels" . | nindent 4 }}
|
||||
app.kubernetes.io/component: web
|
||||
spec:
|
||||
replicas: {{ .Values.web.replicaCount }}
|
||||
selector:
|
||||
matchLabels:
|
||||
{{- include "entkube.selectorLabels" . | nindent 6 }}
|
||||
app.kubernetes.io/component: web
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
{{- include "entkube.selectorLabels" . | nindent 8 }}
|
||||
app.kubernetes.io/component: web
|
||||
spec:
|
||||
{{- with .Values.imagePullSecrets }}
|
||||
imagePullSecrets:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
serviceAccountName: {{ include "entkube.serviceAccountName" . }}
|
||||
containers:
|
||||
- name: web
|
||||
image: {{ include "entkube.image" (dict "root" . "component" .Values.web) }}
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: {{ .Values.web.port }}
|
||||
protocol: TCP
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /health
|
||||
port: http
|
||||
initialDelaySeconds: 10
|
||||
periodSeconds: 30
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /health/ready
|
||||
port: http
|
||||
initialDelaySeconds: 5
|
||||
periodSeconds: 10
|
||||
resources:
|
||||
{{- toYaml .Values.web.resources | nindent 12 }}
|
||||
env:
|
||||
- name: ASPNETCORE_URLS
|
||||
value: "http://+:{{ .Values.web.port }}"
|
||||
- name: Services__Clusters__BaseUrl
|
||||
value: "http://{{ include "entkube.fullname" . }}-clusters:{{ .Values.clusters.port }}"
|
||||
- name: Services__Provisioning__BaseUrl
|
||||
value: "http://{{ include "entkube.fullname" . }}-provisioning:{{ .Values.provisioning.port }}"
|
||||
- name: Services__Identity__BaseUrl
|
||||
value: "http://{{ include "entkube.fullname" . }}-identity:{{ .Values.identity.port }}"
|
||||
{{- end }}
|
||||
Reference in New Issue
Block a user