-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
163 additions
and
104 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 |
---|---|---|
@@ -1,3 +1,4 @@ | ||
--- | ||
version: 2 | ||
updates: | ||
- package-ecosystem: 'github-actions' | ||
|
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 |
---|---|---|
@@ -1,3 +1,4 @@ | ||
--- | ||
name: Validate API Spec | ||
|
||
on: | ||
|
@@ -19,30 +20,29 @@ jobs: | |
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5 | ||
with: | ||
fetch-depth: 1 | ||
- name: Checkout code | ||
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5 | ||
with: | ||
fetch-depth: 1 | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@c2ac33f2c62f978d6c944d9648125a294e56dc0b # v4.0.2 | ||
with: | ||
node-version: 'v20.12.0' | ||
- name: Setup Node.js | ||
uses: actions/setup-node@c2ac33f2c62f978d6c944d9648125a294e56dc0b # v4.0.2 | ||
with: | ||
node-version: 'v20.12.0' | ||
|
||
- name: Install tsp | ||
run: npm install -g @typespec/[email protected] | ||
- name: Install tsp | ||
run: npm install -g @typespec/[email protected] | ||
|
||
- name: Install dependencies | ||
run: npm ci | ||
- name: Install dependencies | ||
run: npm ci | ||
|
||
- name: Install autorest | ||
run: npm install -g [email protected] | ||
- name: Install autorest | ||
run: npm install -g [email protected] | ||
|
||
- name: make generate | ||
run: make generate | ||
working-directory: './api' | ||
|
||
- name: Check for Uncommitted Changes | ||
run: | | ||
git diff --exit-code || (echo "::error::Uncommitted changes detected in OpenAPI spec. Please regenerate and commit them." && exit 1) | ||
- name: make generate | ||
run: make generate | ||
working-directory: './api' | ||
|
||
- name: Check for Uncommitted Changes | ||
run: | | ||
git diff --exit-code || (echo "::error::Uncommitted changes detected in OpenAPI spec. Please regenerate and commit them." && exit 1) |
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 |
---|---|---|
@@ -1,3 +1,4 @@ | ||
--- | ||
name: 'ci-go' | ||
on: | ||
pull_request: | ||
|
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,23 @@ | ||
--- | ||
# MegaLinter GitHub Action configuration file | ||
# More info at https://oxsecurity.github.io/megalinter | ||
name: mega-linter-yaml | ||
|
||
on: | ||
pull_request: | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
build: | ||
name: mega-linter-yaml | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5 | ||
with: | ||
fetch-depth: 1 | ||
|
||
- name: yamllint | ||
uses: oxsecurity/megalinter/flavors/ci_light@v7 |
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,30 @@ | ||
--- | ||
yaml-files: | ||
- '*.yaml' | ||
- '*.yml' | ||
- '.yamllint' | ||
|
||
rules: | ||
braces: enable | ||
brackets: enable | ||
colons: enable | ||
commas: enable | ||
comments: disable | ||
comments-indentation: disable | ||
document-end: disable | ||
document-start: disable | ||
empty-lines: enable | ||
empty-values: disable | ||
hyphens: enable | ||
indentation: disable | ||
key-duplicates: enable | ||
key-ordering: disable | ||
line-length: disable | ||
new-line-at-end-of-file: enable | ||
new-lines: enable | ||
octal-values: disable | ||
quoted-strings: disable | ||
trailing-spaces: enable | ||
truthy: | ||
level: warning | ||
check-keys: false |
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 |
---|---|---|
@@ -1,3 +1,4 @@ | ||
--- | ||
emit: | ||
- '@azure-tools/typespec-autorest' | ||
options: | ||
|
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 |
---|---|---|
@@ -1,92 +1,93 @@ | ||
--- | ||
apiVersion: template.openshift.io/v1 | ||
kind: Template | ||
metadata: | ||
name: frontend-template | ||
|
||
parameters: | ||
- name: NAMESPACE | ||
required: true | ||
value: aro-hcp | ||
- name: REPLICAS | ||
required: true | ||
value: "1" | ||
- name: ARO_HCP_FRONTEND_IMAGE | ||
required: true | ||
- name: FRONTEND_MI_CLIENT_ID | ||
required: true | ||
description: "Client ID of Frontend Managed Identity" | ||
- name: NAMESPACE | ||
required: true | ||
value: aro-hcp | ||
- name: REPLICAS | ||
required: true | ||
value: "1" | ||
- name: ARO_HCP_FRONTEND_IMAGE | ||
required: true | ||
- name: FRONTEND_MI_CLIENT_ID | ||
required: true | ||
description: "Client ID of Frontend Managed Identity" | ||
|
||
objects: | ||
- apiVersion: v1 | ||
kind: Namespace | ||
metadata: | ||
name: ${NAMESPACE} | ||
- apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
annotations: | ||
azure.workload.identity/client-id: ${FRONTEND_MI_CLIENT_ID} | ||
name: frontend | ||
namespace: ${NAMESPACE} | ||
- apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
labels: | ||
app: aro-hcp-frontend | ||
name: aro-hcp-frontend | ||
namespace: ${NAMESPACE} | ||
spec: | ||
progressDeadlineSeconds: 600 | ||
replicas: ${{REPLICAS}} | ||
revisionHistoryLimit: 10 | ||
selector: | ||
matchLabels: | ||
- apiVersion: v1 | ||
kind: Namespace | ||
metadata: | ||
name: ${NAMESPACE} | ||
- apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
annotations: | ||
azure.workload.identity/client-id: ${FRONTEND_MI_CLIENT_ID} | ||
name: frontend | ||
namespace: ${NAMESPACE} | ||
- apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
labels: | ||
app: aro-hcp-frontend | ||
strategy: | ||
rollingUpdate: | ||
maxSurge: 25% | ||
maxUnavailable: 25% | ||
type: RollingUpdate | ||
template: | ||
metadata: | ||
labels: | ||
name: aro-hcp-frontend | ||
namespace: ${NAMESPACE} | ||
spec: | ||
progressDeadlineSeconds: 600 | ||
replicas: ${{REPLICAS}} | ||
revisionHistoryLimit: 10 | ||
selector: | ||
matchLabels: | ||
app: aro-hcp-frontend | ||
azure.workload.identity/use: "true" | ||
spec: | ||
serviceAccountName: frontend | ||
containers: | ||
- name: aro-hcp-frontend | ||
image: ${ARO_HCP_FRONTEND_IMAGE} | ||
imagePullPolicy: IfNotPresent | ||
ports: | ||
- containerPort: 8443 | ||
protocol: TCP | ||
resources: | ||
limits: | ||
memory: 1Gi | ||
requests: | ||
cpu: 100m | ||
memory: 500Mi | ||
securityContext: | ||
allowPrivilegeEscalation: false | ||
capabilities: | ||
drop: | ||
- ALL | ||
runAsNonRoot: true | ||
seccompProfile: | ||
type: RuntimeDefault | ||
livenessProbe: | ||
httpGet: | ||
path: /healthz/ready | ||
port: 8443 | ||
initialDelaySeconds: 15 | ||
periodSeconds: 20 | ||
failureThreshold: 3 | ||
readinessProbe: | ||
httpGet: | ||
path: /healthz/ready | ||
port: 8443 | ||
initialDelaySeconds: 5 | ||
periodSeconds: 10 | ||
restartPolicy: Always | ||
terminationGracePeriodSeconds: 30 | ||
strategy: | ||
rollingUpdate: | ||
maxSurge: 25% | ||
maxUnavailable: 25% | ||
type: RollingUpdate | ||
template: | ||
metadata: | ||
labels: | ||
app: aro-hcp-frontend | ||
azure.workload.identity/use: "true" | ||
spec: | ||
serviceAccountName: frontend | ||
containers: | ||
- name: aro-hcp-frontend | ||
image: ${ARO_HCP_FRONTEND_IMAGE} | ||
imagePullPolicy: IfNotPresent | ||
ports: | ||
- containerPort: 8443 | ||
protocol: TCP | ||
resources: | ||
limits: | ||
memory: 1Gi | ||
requests: | ||
cpu: 100m | ||
memory: 500Mi | ||
securityContext: | ||
allowPrivilegeEscalation: false | ||
capabilities: | ||
drop: | ||
- ALL | ||
runAsNonRoot: true | ||
seccompProfile: | ||
type: RuntimeDefault | ||
livenessProbe: | ||
httpGet: | ||
path: /healthz/ready | ||
port: 8443 | ||
initialDelaySeconds: 15 | ||
periodSeconds: 20 | ||
failureThreshold: 3 | ||
readinessProbe: | ||
httpGet: | ||
path: /healthz/ready | ||
port: 8443 | ||
initialDelaySeconds: 5 | ||
periodSeconds: 10 | ||
restartPolicy: Always | ||
terminationGracePeriodSeconds: 30 |