Skip to content
This repository was archived by the owner on Jun 17, 2024. It is now read-only.

Commit cb41e92

Browse files
authored
Merge pull request #75 from Azure/dev
Applied feedback from broader audience
2 parents bbf93be + 21fb958 commit cb41e92

File tree

10 files changed

+22
-177
lines changed

10 files changed

+22
-177
lines changed

.github/workflows/docker-build-push.yml

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

.github/workflows/e2e-test.yml

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

.github/workflows/kubepug.yml

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

.github/workflows/main.yml

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

.github/workflows/pluto.yml

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

README.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,20 @@ Try it out by setting up a new AKS cluster with a sample application that uses E
3636
git clone https://github.com/Azure/EasyAuthForK8s.git
3737
cd EasyAuthForK8s
3838
39-
# hint - run bash main.sh -h for parameter help
39+
# Hint - run bash main.sh -h for parameter help
40+
# Note: AAD app name (-a) must be *globally* unique
4041
# Note: Cluster name (-c) must be unique
41-
bash main.sh -a easy-auth-demo -c {insert-unique-hostname} -r easy-auth -e email@contoso.com -l eastus
42+
# Estimated Runtime: 15 minutes
43+
bash main.sh -a {insert-unique-app-name} -c {insert-unique-cluster-name} -r easy-auth -e email@contoso.com -l eastus
4244
```
45+
What the quickstart script does:
46+
1) Deploy an AKS cluster
47+
2) Install an Nginx Ingress controller
48+
3) Configure DNS for the cluster public IP
49+
4) Register an AAD Application
50+
5) Install Cert Manager
51+
6) Deploy the Easy Auth Proxy
52+
7) Deploy the Application
4353

4454
## Documentation
4555
* [Setup Instructions](docs/setup-instructions.md) - step-by-step guide to building a cluster, configuring the ingress controller, and deploying an application protected by EasyAuth

docs/setup-instructions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ kubectl get svc,deploy,pod
247247
For this sample app, we will use the sample application found in this repo
248248

249249
```
250-
kubectl run easyauth-sample-pod --image=docker.io/dakondra/eak-test-container:latest --expose --port=80
250+
kubectl run easyauth-sample-pod --image=docker.io/dakondra/eak-sample:latest --expose --port=80
251251
252252
cat << EOF > ./sample-ingress.yaml
253253
apiVersion: networking.k8s.io/v1

main.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ echo "BEGIN @ $(date +"%T"): Deploy sample app..."
153153
# If we have a parameter for an image install a custom image. If not, then we install kuard.
154154
if [ -z "$INPUTIMAGE" ]; then
155155
echo "No image input, installing sample."
156-
kubectl run easyauth-sample-pod --image=docker.io/dakondra/eak-test-container:latest --expose --port=80
156+
kubectl run easyauth-sample-pod --image=docker.io/dakondra/eak-sample:latest --expose --port=80
157157
else
158158
echo "Your custom image $INPUTIMAGE installed"
159159
kubectl run custom-pod --image=$INPUTIMAGE --expose --port=80

sample/EasyAuthForK8s.Sample/Pages/Index.cshtml.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ public IndexModel(ILogger<IndexModel> logger)
1414
}
1515
public void OnGet(string? encoding, string? format, string? prefix)
1616
{
17+
try
18+
{
1719
if (!string.IsNullOrEmpty(encoding))
1820
Encoding = encoding!;
1921
if (!string.IsNullOrEmpty(format))
@@ -38,6 +40,11 @@ public void OnGet(string? encoding, string? format, string? prefix)
3840
}
3941

4042
Headers.AddRange(headers.ToList());
43+
}
44+
catch (Exception ex)
45+
{
46+
// Do nothing, just don't throw an exception.
47+
}
4148
}
4249
public List<KeyValuePair<string, string>> Headers = new();
4350
public string Encoding = "UrlEncode";

src/EasyAuthForK8s.Web/Models/AppManifest.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ public struct AppManifestResult
120120
public bool Succeeded { get; set; } = false;
121121
public Exception? Exception { get; set; } = null;
122122
public AppManifest? AppManifest { get; set; } = null;
123+
public AppManifestResult() { }
123124
}
124125

125126

0 commit comments

Comments
 (0)