Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/github_actions/actions/setup-dotn…
Browse files Browse the repository at this point in the history
…et-4.0.0
  • Loading branch information
hsubramanianaks authored Mar 5, 2024
2 parents 6c052ae + caadcaf commit e6d7f05
Show file tree
Hide file tree
Showing 6 changed files with 80 additions and 9 deletions.
4 changes: 2 additions & 2 deletions samples/managed-identity/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
#See https://aka.ms/containerfastmode to understand how Visual Studio uses this Dockerfile to build your images for faster debugging.

FROM mcr.microsoft.com/dotnet/aspnet:8.0-cbl-mariner2.0@sha256:11d43dfc1c0887670f1580e1ac03f100dc8418845e5530e66aa266915a260abb AS base
FROM mcr.microsoft.com/dotnet/aspnet:7.0-cbl-mariner2.0@sha256:ea1751dfd2defec87508aa979088741935d1fd4c870bfd53e7645642fc9ead13 as base
ARG TARGETARCH
WORKDIR /app
EXPOSE 80

FROM mcr.microsoft.com/dotnet/sdk:8.0-cbl-mariner2.0@sha256:e14034d5ba09b02204d56e809343586475433fd021938488088ccc5cae9d3cd2 AS build
FROM mcr.microsoft.com/dotnet/sdk:7.0-cbl-mariner2.0@sha256:9e054d0663d07e09127d114f753c1068d0bf681eab188352d06f111ce68f050f AS build
ARG TARGETARCH
WORKDIR /src
COPY "mi-webapp.csproj" .
Expand Down
71 changes: 71 additions & 0 deletions samples/managed-identity/deploy-arm.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: mi-webapp
namespace: mi-webapp
spec:
replicas: 1
selector:
matchLabels:
app: mi-webapp
template:
metadata:
labels:
app: mi-webapp
# Label for pod identity
aadpodidbinding: mi-test
spec:
containers:
- image: mindarodev.azurecr.io/samples/mi-webapp:v3
imagePullPolicy: IfNotPresent
name: mi-webapp
env:
# the below environment variable values come from the below sub and rg:
# Sub: Mindaro Testing (c2e0f009-a61a-4578-8a6d-5715ee782648)
# RG: testing-scenario
# Storage account name: mitestsa
# Managed identity name: mi-test
- name: STORAGE_ACCOUNT_NAME
value: "mitestsa"
- name: STORAGE_CONTAINER_NAME
value: "mitestsa-container"
- name: MI_CLIENT_ID
value: "a2cc59eb-fa11-485c-9bee-c84aa4cb97d0"
ports:
- containerPort: 80

---

apiVersion: v1
kind: Service
metadata:
name: mi-webapp-service
namespace: mi-webapp
spec:
selector:
app: mi-webapp
ports:
- protocol: TCP
port: 80
targetPort: 80
type: LoadBalancer

---
# AzureIdentity resource for pod identity
apiVersion: "aadpodidentity.k8s.io/v1"
kind: AzureIdentity
metadata:
name: mi-test
spec:
type: 0
resourceID: "/subscriptions/c2e0f009-a61a-4578-8a6d-5715ee782648/resourcegroups/MC_testing-scenario_testing-scenarios-arm_westeurope/providers/Microsoft.ManagedIdentity/userAssignedIdentities/mi-test"
clientID: "a2cc59eb-fa11-485c-9bee-c84aa4cb97d0"
---
# AzureIdentityBinding resource for pod identity
apiVersion: "aadpodidentity.k8s.io/v1"
kind: AzureIdentityBinding
metadata:
name: mi-test-binding
spec:
azureIdentity: mi-test
selector: mi-test
2 changes: 1 addition & 1 deletion samples/managed-identity/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ spec:
aadpodidbinding: mi-test
spec:
containers:
- image: mindarodev.azurecr.io/samples/mi-webapp:v2
- image: mindarodev.azurecr.io/samples/mi-webapp:v3
imagePullPolicy: IfNotPresent
name: mi-webapp
env:
Expand Down
4 changes: 2 additions & 2 deletions src/devhostagent.restorationjob/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Build container
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:8.0-cbl-mariner2.0@sha256:e14034d5ba09b02204d56e809343586475433fd021938488088ccc5cae9d3cd2 AS build
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:7.0-cbl-mariner2.0@sha256:9e054d0663d07e09127d114f753c1068d0bf681eab188352d06f111ce68f050f AS build
ARG TARGETARCH
ARG Configuration=Release
ARG TelemetryType=TELEMETRY_DEVELOPMENT
Expand All @@ -18,7 +18,7 @@ ENV MINDARO_BUILD_NUMBER=${MindaroBuildNumber}
RUN dotnet publish -c ${Configuration} -a ${TARGETARCH} --self-contained false --no-restore -o /output devhostAgent.restorationjob.csproj

# Final container
FROM mcr.microsoft.com/dotnet/aspnet:8.0-cbl-mariner2.0@sha256:11d43dfc1c0887670f1580e1ac03f100dc8418845e5530e66aa266915a260abb as final
FROM mcr.microsoft.com/dotnet/aspnet:7.0-cbl-mariner2.0@sha256:ea1751dfd2defec87508aa979088741935d1fd4c870bfd53e7645642fc9ead13 as final

# Setup common tools
RUN tdnf clean all && \
Expand Down
4 changes: 2 additions & 2 deletions src/devhostagent/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Build container
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:8.0-cbl-mariner2.0@sha256:e14034d5ba09b02204d56e809343586475433fd021938488088ccc5cae9d3cd2 AS build
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:7.0-cbl-mariner2.0@sha256:9e054d0663d07e09127d114f753c1068d0bf681eab188352d06f111ce68f050f AS build

ARG TARGETARCH
ARG Configuration=Release
Expand All @@ -19,7 +19,7 @@ ENV MINDARO_BUILD_NUMBER=${MindaroBuildNumber}
RUN dotnet publish -c ${Configuration} -a ${TARGETARCH} --self-contained false --no-restore -o /src/publish devhostAgent.csproj

# Final container
FROM mcr.microsoft.com/dotnet/aspnet:8.0-cbl-mariner2.0@sha256:11d43dfc1c0887670f1580e1ac03f100dc8418845e5530e66aa266915a260abb as final
FROM mcr.microsoft.com/dotnet/aspnet:7.0-cbl-mariner2.0@sha256:ea1751dfd2defec87508aa979088741935d1fd4c870bfd53e7645642fc9ead13 as final

RUN tdnf clean all && \
tdnf check-update && \
Expand Down
4 changes: 2 additions & 2 deletions src/routingmanager/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Build container
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:8.0-cbl-mariner2.0@sha256:e14034d5ba09b02204d56e809343586475433fd021938488088ccc5cae9d3cd2 AS build
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:7.0-cbl-mariner2.0@sha256:9e054d0663d07e09127d114f753c1068d0bf681eab188352d06f111ce68f050f AS build
ARG TARGETARCH
ARG Configuration=Release
ARG TelemetryType=TELEMETRY_DEVELOPMENT
Expand All @@ -19,7 +19,7 @@ ENV MINDARO_BUILD_NUMBER=${MindaroBuildNumber}
RUN dotnet publish -c ${Configuration} -a ${TARGETARCH} --self-contained false --no-restore -o /src/publish

# Final container
FROM mcr.microsoft.com/dotnet/aspnet:8.0-cbl-mariner2.0@sha256:11d43dfc1c0887670f1580e1ac03f100dc8418845e5530e66aa266915a260abb as final
FROM mcr.microsoft.com/dotnet/aspnet:7.0-cbl-mariner2.0@sha256:ea1751dfd2defec87508aa979088741935d1fd4c870bfd53e7645642fc9ead13 as final
ARG TARGETARCH
ARG KUBECTL_VERSION=v1.27.3
ARG INSTALL_LOCATION=/app/kubectl/linux
Expand Down

0 comments on commit e6d7f05

Please sign in to comment.