-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
21 changed files
with
2,865 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
FROM --platform=$BUILDPLATFORM golang:1.20 AS builder | ||
|
||
LABEL org.opencontainers.image.source=https://github.com/canonical/identity-platform-admin-ui | ||
|
||
ARG SKAFFOLD_GO_GCFLAGS | ||
ARG TARGETOS | ||
ARG TARGETARCH | ||
ARG app_name=reader | ||
|
||
ENV GOOS=$TARGETOS | ||
ENV GOARCH=$TARGETARCH | ||
ENV GO111MODULE=on | ||
ENV CGO_ENABLED=0 | ||
ENV GO_BIN=/go/bin/app | ||
ENV APP_NAME=$app_name | ||
|
||
WORKDIR /var/app | ||
|
||
COPY . . | ||
|
||
RUN make build | ||
|
||
FROM gcr.io/distroless/static:nonroot | ||
|
||
LABEL org.opencontainers.image.source=https://github.com/canonical/identity-platform-admin-ui | ||
|
||
COPY --from=builder /go/bin/app /app | ||
|
||
CMD ["/app"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
--- | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: identity-platform-admin-ui | ||
data: | ||
PORT: "8000" | ||
LOG_LEVEL: DEBUG | ||
TRACING_ENABLED: "false" | ||
KRATOS_URL: http://kratos.svc.cluster.local:4434 | ||
HYDRA_ADMIN_URL: http://hydra.svc.cluster.local:4445 | ||
CONFIGMAP_NAME: idps | ||
CONFIGMAP_NAMESPACE: default | ||
--- | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: idps | ||
data: | ||
"idps.yaml": | | ||
- id: microsoft_af675f353bd7451588e2b8032e315f6f | ||
client_id: af675f35-3bd7-4515-88e2-b8032e315f6f | ||
provider: microsoft | ||
client_secret: 3y38Q~aslkdhaskjhd~W0xWDB.123u98asd | ||
microsoft_tenant: e1574293-28de-4e94-87d5-b61c76fc14e1 | ||
mapper_url: file:///etc/config/kratos/microsoft_schema.jsonnet | ||
scope: | ||
- profile | ||
- address | ||
- phone | ||
- id: google_18fa2999e6c9475aa49515d933d8e8ce | ||
client_id: 18fa2999-e6c9-475a-a495-15d933d8e8ce | ||
provider: google | ||
client_secret: 3y38Q~aslkdhaskjhd~W0xWDB.123u98asd | ||
mapper_url: file:///etc/config/kratos/google_schema.jsonnet | ||
scope: | ||
- profile | ||
- address | ||
- phone | ||
- id: aws_18fa2999e6c9475aa49589d941d8e1zy | ||
client_id: 18fa2999-e6c9-475a-a495-89d941d8e1zy | ||
provider: aws | ||
client_secret: 3y38Q~aslkdhaskjhd~W0xWDB.123u98asd | ||
mapper_url: file:///etc/config/kratos/google_schema.jsonnet | ||
scope: | ||
- profile | ||
- address | ||
- phone |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
--- | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: identity-platform-admin-ui | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
app: identity-platform-admin-ui | ||
strategy: | ||
type: Recreate | ||
template: | ||
metadata: | ||
labels: | ||
app: identity-platform-admin-ui | ||
annotations: | ||
prometheus.io/path: /api/v0/metrics | ||
prometheus.io/scrape: "true" | ||
prometheus.io/port: "8000" | ||
spec: | ||
containers: | ||
- image: ghcr.io/canonical/identity-platform-admin-ui | ||
name: identity-platform-admin-ui | ||
envFrom: | ||
- configMapRef: | ||
name: identity-platform-admin-ui | ||
ports: | ||
- name: http | ||
containerPort: 8000 | ||
readinessProbe: | ||
httpGet: | ||
path: "/api/v0/status" | ||
port: 8000 | ||
initialDelaySeconds: 1 | ||
failureThreshold: 10 | ||
timeoutSeconds: 5 | ||
periodSeconds: 30 | ||
livenessProbe: | ||
httpGet: | ||
path: "/api/v0/status" | ||
port: 8000 | ||
initialDelaySeconds: 1 | ||
failureThreshold: 10 | ||
timeoutSeconds: 5 | ||
periodSeconds: 30 | ||
imagePullSecrets: | ||
- name: regcred-github |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
--- | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
annotations: | ||
prometheus.io/path: /api/v0/metrics | ||
prometheus.io/scrape: "true" | ||
io.cilium/global-service: "true" | ||
name: identity-platform-admin-ui | ||
spec: | ||
ports: | ||
- name: http | ||
port: 80 | ||
protocol: TCP | ||
targetPort: http | ||
selector: | ||
app: identity-platform-admin-ui | ||
type: ClusterIP | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.