-
Notifications
You must be signed in to change notification settings - Fork 0
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
0 parents
commit f8707a9
Showing
9 changed files
with
114 additions
and
0 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,31 @@ | ||
name: Run Aider | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
run-aider: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v1 | ||
|
||
- name: Log in to Docker Hub | ||
uses: docker/login-action@v1 | ||
with: | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
|
||
- name: Build Docker image | ||
run: | | ||
docker build -t aider-full . | ||
- name: Run Aider from Docker container | ||
run: | | ||
docker run --rm -v ${{ github.workspace }}:/repo -w /repo paulgauthier/aider-full |
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,7 @@ | ||
FROM paulgauthier/aider-full | ||
RUN apt-get update | ||
RUN apt-get install -y make | ||
COPY scenarios /app/ | ||
COPY Makefile /app/ | ||
WORKDIR /app | ||
ENTRYPOINT [ "make" ] |
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,15 @@ | ||
|
||
.PHONY: healtcheck-openai-4o | ||
healtcheck-openai-4o: | ||
@echo "Running $(@)" | ||
@aider --model openai/gpt-4o --dry-run --load scenarios/healthchecks/scenario.cmd | ||
|
||
.PHONY: healtcheck-anthropic-haiku | ||
healtcheck-anthropic-sonnet: | ||
@echo "Running $(@)" | ||
@aider --model anthropic/claude-3-5-sonnet-20241022 --dry-run --load scenarios/healthchecks/scenario.cmd | ||
|
||
.PHONY: docker-build | ||
docker-build: | ||
@echo "Building Docker image" | ||
@docker build -t aider-agent . |
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,16 @@ | ||
Alerts should be created for all services and added to the values.yaml file. The minimum alert is called `crash-loop`. | ||
|
||
```yaml | ||
alerts: | ||
- name: CrashLoop | ||
annotations: | ||
description: 'Pod {{ $labels.namespace }}/{{ $labels.pod }} ({{ $labels.container | ||
}}) is in waiting state (reason: "CrashLoopBackOff").' | ||
runbook_url: https://runbooks.prometheus-operator.dev/runbooks/kubernetes/kubepodcrashlooping | ||
summary: Pod is crash looping. | ||
expr: max_over_time(kube_pod_container_status_waiting_reason{reason="CrashLoopBackOff", | ||
job="kube-state-metrics", namespace=~".*"}[5m]) >= 1 | ||
for: 15m | ||
labels: | ||
severity: warning | ||
``` |
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,3 @@ | ||
Microservices can be configured through their `configuration` files. These files are located in different locations and contain important configuration values, including healthchecks. | ||
* `config.yaml` | ||
* `application.yaml` |
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,9 @@ | ||
The readiness and liveness health check urls are, by default, configured as below. To change them, modify `config.yaml`. | ||
|
||
```yaml | ||
healthchecks: | ||
liveness: | ||
url: /alternate-livez-path | ||
readiness: | ||
url: /alternate-readyz-path | ||
``` |
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,22 @@ | ||
Readiness and liveness are known as `health checks` and are defined in the `values.yaml` file. In the example, placeholder values are provided and service-specific values must be used. | ||
|
||
```yaml | ||
microservice: | ||
readiness: | ||
enabled: true | ||
path: READINESS-URL | ||
port: 80 | ||
initialDelaySeconds: 5 | ||
periodSeconds: 5 | ||
failureThreshold: 3 | ||
liveness: | ||
enabled: true | ||
path: LIVENESS-URL | ||
initialDelaySeconds: 5 | ||
periodSeconds: 5 | ||
failureThreshold: 5 | ||
``` | ||
## References | ||
* [Configuring readiness and liveness urls](configure-healthchecks.md) | ||
* [URL validation](validate-url.md) |
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,6 @@ | ||
#!/bin/zsh | ||
|
||
# Run the Aider application | ||
|
||
aider --dry-run \ | ||
--load scenarios/healthchecks/scenario.cmd |
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,5 @@ | ||
/add scenarios/healthchecks/repair.md | ||
/add manifest/staging/values.yaml | ||
/add scenarios/healthchecks/configure-healthchecks.md | ||
/add src/config.yaml | ||
/code Use the configured healthchecks to repair the issues with missing healthchecks in the values.yaml file. |