Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
drmorr0 committed Jun 13, 2024
1 parent cd65037 commit 342ddaf
Show file tree
Hide file tree
Showing 17 changed files with 56 additions and 29 deletions.
1 change: 1 addition & 0 deletions .codecov.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
github_checks:
annotations: false

Expand Down
1 change: 1 addition & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
---
github: acrlabs
3 changes: 2 additions & 1 deletion .github/workflows/k8s_plan.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
name: Compute k8s plan

on:
on: # yamllint disable-line rule:truthy
pull_request:
paths:
- 'k8s/**'
Expand Down
15 changes: 9 additions & 6 deletions .github/workflows/pr_comment_finished.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
name: Comment on the PR

on:
on: # yamllint disable-line rule:truthy
workflow_run:
workflows: ["Compute k8s plan"]
types:
Expand All @@ -12,7 +13,8 @@ jobs:
if: >
github.event.workflow_run.event == 'pull_request' &&
github.event.workflow_run.conclusion == 'success'
env:
ASSETS_URL: "https://raw.githubusercontent.com/acrlabs/fireconfig/master/assets"
steps:
- name: Download artifact
uses: actions/download-artifact@v4
Expand Down Expand Up @@ -41,10 +43,11 @@ jobs:
echo "<!-- 🔥config summary -->" > fireconfig-comment.md
echo "## Kubernetes Object DAG" >> fireconfig-comment.md
cat k8s-plan-artifacts/dag.mermaid >> fireconfig-comment.md
echo '<img src="https://raw.githubusercontent.com/acrlabs/fireconfig/master/assets/new.png" width=10/> New object' >> fireconfig-comment.md
echo '<img src="https://raw.githubusercontent.com/acrlabs/fireconfig/master/assets/removed.png" width=10/> Deleted object' >> fireconfig-comment.md
echo '<img src="https://raw.githubusercontent.com/acrlabs/fireconfig/master/assets/changed.png" width=10/> Updated object' >> fireconfig-comment.md
echo '<img src="https://raw.githubusercontent.com/acrlabs/fireconfig/master/assets/pod_recreate.png" width=10/> Updated object (causes pod recreation)' >> fireconfig-comment.md
echo '<img src="${ASSETS_URL}/new.png" width=10/> New object' >> fireconfig-comment.md
echo '<img src="${ASSETS_URL}/removed.png" width=10/> Deleted object' >> fireconfig-comment.md
echo '<img src="${ASSETS_URL}/changed.png" width=10/> Updated object' >> fireconfig-comment.md
echo '<img src="${ASSETS_URL}/pod_recreate.png" width=10/> Updated object (causes pod recreation)' \
>> fireconfig-comment.md
echo "## Detailed Diff" >> fireconfig-comment.md
cat k8s-plan-artifacts/k8s.df >> fireconfig-comment.md
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/pr_comment_starting.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
name: Update the PR Comment

on:
on: # yamllint disable-line rule:truthy
#######################################################################################
# WARNING: DO NOT CHANGE THIS ACTION TO CHECK OUT OR EXECUTE ANY CODE!!!!! #
# #
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/publish_docs.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
name: Publish Docs
on:
on: # yamllint disable-line rule:truthy
push:
paths:
- 'docs/**'
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/verify.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
name: code verification
on: [push]
on: [push] # yamllint disable-line rule:truthy
env:
CARGO_INCREMENTAL: 0
SCCACHE_GHA_ENABLED: "true"
Expand Down Expand Up @@ -55,7 +56,9 @@ jobs:
run: |
rustup toolchain install nightly-x86_64-unknown-linux-gnu
rustup component add rustfmt --toolchain nightly-x86_64-unknown-linux-gnu
- name: Lint Rust code
- name: Run pre-commit
uses: pre-commit/[email protected]
- name: Format Rust code
run: make lint

test:
Expand Down
8 changes: 6 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
---
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: end-of-file-fixer
- id: check-yaml
args: ["--allow-multiple-documents"]
- id: trailing-whitespace
- repo: https://github.com/adrienverge/yamllint
rev: v1.35.1
hooks:
- id: yamllint
args: ['--strict']
- repo: https://github.com/doublify/pre-commit-rust
rev: v1.0
hooks:
Expand Down
10 changes: 10 additions & 0 deletions .yamllint
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
extends: default

ignore:
- examples/metrics
- k8s/raw/simkube.io_simulations.yml

rules:
line-length:
max: 120
4 changes: 0 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,6 @@ pre-image:
$(CARGO_HOME_ENV) cargo build --target-dir=$(BUILD_DIR) --bin=$* --color=always
cp $(BUILD_DIR)/debug/$* $(BUILD_DIR)/.

lint:
cargo +nightly fmt
cargo clippy

test: unit itest

.PHONY: unit
Expand Down
3 changes: 2 additions & 1 deletion api/v1/simkube.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
openapi: 3.1.0
info:
title: SimKube API
Expand Down Expand Up @@ -40,7 +41,7 @@ paths:
excluded_labels:
type: array
items:
$ref: 'https://raw.githubusercontent.com/kubernetes/kubernetes/master/api/openapi-spec/v3/api__v1_openapi.json#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector'
$ref: 'https://raw.githubusercontent.com/kubernetes/kubernetes/master/api/openapi-spec/v3/api__v1_openapi.json#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector' # yamllint disable-line rule:line-length
exclude_daemonsets:
type: boolean
responses:
Expand Down
22 changes: 11 additions & 11 deletions docs/mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@ nav:
- Home: README.md
- FAQ: docs/faq.md
- Getting Started:
- Concepts: docs/intro/concepts.md
- Installation: docs/intro/installation.md
- Running a Simulation: docs/intro/running.md
- Concepts: docs/intro/concepts.md
- Installation: docs/intro/installation.md
- Running a Simulation: docs/intro/running.md
- Advanced:
- Autoscaling: docs/adv/autoscaling.md
- Collecting Metrics: docs/adv/metrics.md
- Autoscaling: docs/adv/autoscaling.md
- Collecting Metrics: docs/adv/metrics.md
- Components:
- sk-ctrl: docs/components/sk-ctrl.md
- sk-driver: docs/components/sk-driver.md
- sk-tracer: docs/components/sk-tracer.md
- skctl: docs/components/skctl.md
- sk-ctrl: docs/components/sk-ctrl.md
- sk-driver: docs/components/sk-driver.md
- sk-tracer: docs/components/sk-tracer.md
- skctl: docs/components/skctl.md
- Contributing:
- Developer's Guide: docs/dev/contributing.md
- API changes: docs/dev/api_changes.md
- Developer's Guide: docs/dev/contributing.md
- API changes: docs/dev/api_changes.md
1 change: 1 addition & 0 deletions examples/metrics/cadvisor-svcmonitor-hd.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
Expand Down
1 change: 1 addition & 0 deletions examples/metrics/kube-apiserver-svcmonitor-hd.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
Expand Down
1 change: 1 addition & 0 deletions examples/metrics/kube-controller-manager-podmonitor-hd.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
apiVersion: monitoring.coreos.com/v1
kind: PodMonitor
metadata:
Expand Down
1 change: 1 addition & 0 deletions examples/metrics/kube-scheduler-podmonitor-hd.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
apiVersion: monitoring.coreos.com/v1
kind: PodMonitor
metadata:
Expand Down
1 change: 1 addition & 0 deletions examples/metrics/kube-state-metrics-svcmonitor-hd.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
Expand Down

0 comments on commit 342ddaf

Please sign in to comment.