Skip to content

Commit 1c77677

Browse files
committed
Identity.API devspaces setup
1 parent 631696c commit 1c77677

6 files changed

Lines changed: 43 additions & 91 deletions

File tree

k8s/helm/identity-api/templates/ingress.yaml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{{- if .Values.ingress.enabled -}}
22
{{- $ingressPath := include "pathBase" . -}}
3+
{{- $serviceName := .Values.app.svc.identity }}
34
apiVersion: extensions/v1beta1
45
kind: Ingress
56
metadata:
@@ -23,11 +24,13 @@ spec:
2324
{{- end }}
2425
{{- end }}
2526
rules:
26-
- host: {{ .Values.inf.k8s.dns }}
27+
{{- range .Values.ingress.hosts }}
28+
- host: {{ . }}
2729
http:
2830
paths:
2931
- path: {{ $ingressPath }}
3032
backend:
31-
serviceName: {{ .Values.app.svc.identity }}
33+
serviceName: {{ $serviceName }}
3234
servicePort: http
35+
{{- end }}
3336
{{- end }}
Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,15 @@
1-
FROM microsoft/dotnet:2.2.100-sdk
1+
FROM microsoft/dotnet:2.2-sdk
22
ARG BUILD_CONFIGURATION=Debug
33
ENV ASPNETCORE_ENVIRONMENT=Development
44
ENV DOTNET_USE_POLLING_FILE_WATCHER=true
55
EXPOSE 80
66

77
WORKDIR /src
88
COPY ["src/Services/Identity/Identity.API/Identity.API.csproj", "src/Services/Identity/Identity.API/"]
9-
COPY ["src/BuildingBlocks/HealthChecks/src/Microsoft.AspNetCore.HealthChecks/Microsoft.AspNetCore.HealthChecks.csproj", "src/BuildingBlocks/HealthChecks/src/Microsoft.AspNetCore.HealthChecks/"]
10-
COPY ["src/BuildingBlocks/HealthChecks/src/Microsoft.Extensions.HealthChecks.SqlServer/Microsoft.Extensions.HealthChecks.SqlServer.csproj", "src/BuildingBlocks/HealthChecks/src/Microsoft.Extensions.HealthChecks.SqlServer/"]
119
COPY ["src/BuildingBlocks/WebHostCustomization/WebHost.Customization/WebHost.Customization.csproj", "src/BuildingBlocks/WebHostCustomization/WebHost.Customization/"]
12-
RUN dotnet restore src/Services/Identity/Identity.API/Identity.API.csproj
10+
RUN dotnet restore src/Services/Identity/Identity.API/Identity.API.csproj -nowarn:msb3202,nu1503
1311
COPY . .
1412
WORKDIR "/src/src/Services/Identity/Identity.API"
15-
RUN dotnet build "Identity.API.csproj"
13+
RUN dotnet build --no-restore -c $BUILD_CONFIGURATION
1614

17-
CMD ["dotnet", "run", "--no-restore", "--no-build", "--no-launch-profile"]
15+
ENTRYPOINT ["dotnet", "run", "--no-build", "--no-launch-profile", "-c", "$BUILD_CONFIGURATION", "--"]

src/Services/Identity/Identity.API/app.yaml

Lines changed: 0 additions & 39 deletions
This file was deleted.
Lines changed: 30 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,54 @@
11
kind: helm-release
2-
apiVersion: 1.0
2+
apiVersion: 1.1
33
build:
44
context: ..\..\..\..
55
dockerfile: Dockerfile
66
install:
77
chart: ../../../../k8s/helm/identity-api
8-
values:
9-
- values.dev.yaml?
10-
- secrets.dev.yaml?
11-
- inf.yaml
12-
- app.yaml
138
set:
149
replicaCount: 1
1510
image:
1611
tag: $(tag)
1712
pullPolicy: Never
18-
inf:
19-
k8s:
20-
dns: "$(spacePrefix)identity$(hostSuffix)"
2113
ingress:
14+
annotations:
15+
kubernetes.io/ingress.class: traefik-azds
2216
hosts:
2317
# This expands to [space.s.]identity.<guid>.<region>.aksapp.io
24-
- $(spacePrefix)identity(hostSuffix)
18+
- $(spacePrefix)identity-api$(hostSuffix)
19+
values:
20+
- values.dev.yaml?
21+
- secrets.dev.yaml?
22+
- inf.yaml
23+
- app.yaml
2524
configurations:
2625
develop:
2726
build:
28-
dockerfile: Dockerfile.develop
2927
useGitIgnore: true
28+
dockerfile: Dockerfile.develop
3029
args:
3130
BUILD_CONFIGURATION: ${BUILD_CONFIGURATION:-Debug}
3231
container:
3332
sync:
34-
- "**/Pages/**"
35-
- "**/Views/**"
36-
- "**/wwwroot/**"
37-
- "!**/*.{sln,csproj}"
38-
command: [dotnet, run, --no-restore, --no-build, --no-launch-profile, -c, "${BUILD_CONFIGURATION:-Debug}"]
33+
- '**/Pages/**'
34+
- '**/Views/**'
35+
- '**/wwwroot/**'
36+
- '!**/*.{sln,csproj}'
37+
command:
38+
- dotnet
39+
- run
40+
- --no-restore
41+
- --no-build
42+
- --no-launch-profile
43+
- -c
44+
- ${BUILD_CONFIGURATION:-Debug}
3945
iterate:
40-
processesToKill: [dotnet, vsdbg]
46+
processesToKill:
47+
- dotnet
48+
- vsdbg
4149
buildCommands:
42-
- [dotnet, build, --no-restore, -c, "${BUILD_CONFIGURATION:-Debug}"]
50+
- - dotnet
51+
- build
52+
- --no-restore
53+
- -c
54+
- ${BUILD_CONFIGURATION:-Debug}

src/Services/Identity/Identity.API/inf.yaml

Lines changed: 0 additions & 26 deletions
This file was deleted.

src/prepare-devspaces.ps1

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@ Write-Host "Copying app.yaml and inf.yaml to Catalog API" -ForegroundColor Yello
3333
Copy-Item "..\k8s\helm\app.yaml" -Destination ".\Services\Catalog\Catalog.API" -Force
3434
Copy-Item "..\k8s\helm\inf.yaml" -Destination ".\Services\Catalog\Catalog.API" -Force
3535

36+
Write-Host "Copying app.yaml and inf.yaml to Identity API" -ForegroundColor Yellow
37+
Copy-Item "..\k8s\helm\app.yaml" -Destination ".\Services\Identity\Identity.API" -Force
38+
Copy-Item "..\k8s\helm\inf.yaml" -Destination ".\Services\Identity\Identity.API" -Force
39+
3640
Write-Host "Copying app.yaml and inf.yaml to WebMVC" -ForegroundColor Yellow
3741
Copy-Item "..\k8s\helm\app.yaml" -Destination ".\Web\WebMVC" -Force
3842
Copy-Item "..\k8s\helm\inf.yaml" -Destination ".\Web\WebMVC" -Force

0 commit comments

Comments
 (0)