Skip to content

Commit

Permalink
Merge branch 'main' into 0719-arch-app
Browse files Browse the repository at this point in the history
Signed-off-by: Meg McRoberts <[email protected]>
  • Loading branch information
StackScribe authored Aug 8, 2023
2 parents 4c9c035 + 0130576 commit 65b6709
Show file tree
Hide file tree
Showing 428 changed files with 1,304 additions and 1,365 deletions.
4 changes: 2 additions & 2 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ documentation:
- docs/**/*
- "**/*.md"

operator:
- operator/**/*
lifecycle-operator:
- lifecycle-operator/**/*

scheduler:
- scheduler/**/*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
processor:
useRawDocstring: true
ignoreTypes:
- "nomatch" # this needs to be in place as a workaround to avoid generation bugs
- "EmptyStatus$"
ignoreFields:
- "TypeMeta$"
- "EmptyStatus$"
Expand Down
6 changes: 3 additions & 3 deletions .github/scripts/generate-crd-docs/generate-crd-docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@

# CRD docs auto generation script
#
# This script goes through all API definitions in the operator/apis folder
# This script goes through all API definitions in the lifecycle-operator/apis folder
# and generates docs from code for each API group and version
#
# Inputs: None

# renovate: datasource=github-releases depName=elastic/crd-ref-docs
GENERATOR_VERSION=master
GENERATOR_VERSION=v0.0.9
API_DOMAIN="keptn.sh"
OPERATOR_API_ROOT='operator/apis/'
OPERATOR_API_ROOT='lifecycle-operator/apis/'
METRICS_API_ROOT='metrics-operator/api/'
TEMPLATE_DIR='.github/scripts/generate-crd-docs/templates'
RENDERER='markdown'
Expand Down
2 changes: 1 addition & 1 deletion .github/scripts/generate-helm-docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# Node >=16

# renovate: datasource=github-releases depName=bitnami-labs/readme-generator-for-helm
GENERATOR_VERSION="2.5.0"
GENERATOR_VERSION="2.5.1"

echo "Checking if readme generator is installed already..."
if [[ $(npm list -g | grep -c "readme-generator-for-helm@${GENERATOR_VERSION}") -eq 0 ]]; then
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/CI.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ jobs:
matrix:
config:
- name: "lifecycle-operator"
folder: "operator/"
folder: "lifecycle-operator/"
- name: "metrics-operator"
folder: "metrics-operator/"
- name: "scheduler"
Expand Down Expand Up @@ -119,7 +119,7 @@ jobs:
matrix:
config:
- name: "lifecycle-operator"
folder: "operator/"
folder: "lifecycle-operator/"
- name: "metrics-operator"
folder: "metrics-operator/"
- name: "scheduler"
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/component-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ jobs:
with:
go-version: ${{ env.GO_VERSION }}
cache: true
cache-dependency-path: 'operator/go.sum'
cache-dependency-path: 'lifecycle-operator/go.sum'
check-latest: true

- name: Execute Component Tests
working-directory: operator
working-directory: lifecycle-operator
run: make component-test

- name: Report code coverage
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/e2e-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
matrix:
config:
- name: "lifecycle-operator"
folder: "operator/"
folder: "lifecycle-operator/"
- name: "scheduler"
folder: "scheduler/"
steps:
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
matrix:
config:
- name: "lifecycle-operator"
folder: "operator/"
folder: "lifecycle-operator/"
- name: "metrics-operator"
folder: "metrics-operator/"
- name: "scheduler"
Expand All @@ -43,6 +43,8 @@ jobs:
with:
go-version: ${{ env.GO_VERSION }}
check-latest: true
cache: true
cache-dependency-path: '${{ matrix.config.folder }}go.sum'

- name: golangci-lint
uses: golangci/golangci-lint-action@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/helm-checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
matrix:
config:
- name: "lifecycle-operator"
folder: "operator/"
folder: "lifecycle-operator/"
- name: "metrics-operator"
folder: "metrics-operator/"
- name: "scheduler"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/htmltest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
with:
path: |
docs/tmp/.hugo
key: ${{ runner.os }}-hugo
key: ${{ runner.os }}-hugo-${{ hashFiles('docs/go.sum') }}

- name: Check HTML
run: make htmltest
7 changes: 4 additions & 3 deletions .github/workflows/markdown-checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ on:
- '[0-9]+.[1-9][0-9]*.x'
paths:
- '**.md'
- 'operator/apis'
- 'metrics-operator/api'
- 'lifecycle-operator/apis/**'
- 'metrics-operator/api/**'
pull_request:
branches:
- 'main'
- '[0-9]+.[1-9][0-9]*.x'
paths:
- '**.md'
- 'operator/apis/**'
- 'lifecycle-operator/apis/**'
- 'metrics-operator/api/**'

env:
Expand Down Expand Up @@ -76,6 +76,7 @@ jobs:
with:
go-version: ${{ env.GO_VERSION }}
check-latest: true
cache: false

- name: Copy old docs
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/performance-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
runtime_tag: ${{ inputs.runtime_tag }}

- name: Execute Performance Tests
working-directory: operator
working-directory: lifecycle-operator
run: |
make performance-test
Expand Down
152 changes: 97 additions & 55 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ jobs:
klt-tag-name: ${{ steps.release.outputs.tag_name }}
cert-manager-release-created: ${{ steps.release.outputs.klt-cert-manager--release_created }}
cert-manager-tag-name: ${{ steps.release.outputs.klt-cert-manager--tag_name }}
metrics-operator-release-created: ${{ steps.release.outputs.metrics-operator--release_created }}
metrics-operator-tag-name: ${{ steps.release.outputs.metrics-operator--tag_name }}
releases-created: ${{ steps.release.outputs.releases_created }}
build-matrix: ${{ steps.build-matrix.outputs.result }}
steps:
Expand All @@ -42,67 +44,69 @@ jobs:

- name: Release Info
run: |
echo "Release KLT: ${{ steps.release.outputs.release_created }}"
echo "Release KLT Cert Manager: ${{ steps.release.outputs.klt-cert-manager--release_created }}"
echo "Anything to release: ${{ steps.release.outputs.releases_created }}"
echo "Paths to be released: ${{ steps.release.outputs.paths_released }}"
echo "Release KLT: ${{ steps.release.outputs.release_created }}"
echo "Release KLT Cert Manager: ${{ steps.release.outputs.klt-cert-manager--release_created }}"
echo "Release KLT Metrics Operator: ${{ steps.release.outputs.metrics-operator--release_created }}"
echo "Anything to release: ${{ steps.release.outputs.releases_created }}"
echo "Paths to be released: ${{ steps.release.outputs.paths_released }}"
- name: Create build matrix
id: build-matrix
uses: actions/github-script@v6
env:
RELEASE_KLT: ${{ steps.release.outputs.release_created }}
RELEASE_CERT_MANAGER: ${{ steps.release.outputs.klt-cert-manager--release_created }}
RELEASE_METRICS_OPERATOR: ${{ steps.release.outputs.metrics-operator--release_created }}
KLT_TAG: ${{ steps.release.outputs.tag_name }}
CERT_MANAGER_TAG: ${{ steps.release.outputs.klt-cert-manager--tag_name }}
METRICS_OPERATOR_TAG: ${{ steps.release.outputs.metrics-operator--tag_name }}
with:
script: |
const { RELEASE_KLT, RELEASE_CERT_MANAGER, KLT_TAG, CERT_MANAGER_TAG } = process.env
const kltMatrix = [
{
name: "lifecycle-operator",
folder: "operator/",
tagName: KLT_TAG
},
{
name: "metrics-operator",
folder: "metrics-operator/",
tagName: KLT_TAG
},
{
name: "scheduler",
folder: "scheduler/",
tagName: KLT_TAG
},
{
name: "functions-runtime",
folder: "functions-runtime/",
tagName: KLT_TAG
},
{
name: "python-runtime",
folder: "python-runtime/",
tagName: KLT_TAG
}
]
const certManagerMatrix = [
{
const { RELEASE_KLT, RELEASE_CERT_MANAGER, RELEASE_METRICS_OPERATOR, KLT_TAG, CERT_MANAGER_TAG, METRICS_OPERATOR_TAG } = process.env
var result = []
if (RELEASE_KLT === "true") {
result.push(...[
{
name: "lifecycle-operator",
folder: "lifecycle-operator/",
tagName: KLT_TAG
},
{
name: "scheduler",
folder: "scheduler/",
tagName: KLT_TAG
},
{
name: "functions-runtime",
folder: "functions-runtime/",
tagName: KLT_TAG
},
{
name: "python-runtime",
folder: "python-runtime/",
tagName: KLT_TAG
}
])
}
if (RELEASE_CERT_MANAGER === "true") {
result.push({
name: "certificate-operator",
folder: "klt-cert-manager/",
tagName: CERT_MANAGER_TAG
}
]
let result = {}
if (RELEASE_KLT === "true" && RELEASE_CERT_MANAGER === "true") {
result = { config: [...kltMatrix, ...certManagerMatrix]}
} else if (RELEASE_KLT === "true") {
result = { config: kltMatrix }
} else if (RELEASE_CERT_MANAGER === "true") {
result = { config: certManagerMatrix }
})
}
return result
if (RELEASE_METRICS_OPERATOR === "true") {
result.push({
name: "metrics-operator",
folder: "metrics-operator/",
tagName: METRICS_OPERATOR_TAG
})
}
return { config: result }
build-release:
if: needs.release-please.outputs.releases-created == 'true'
Expand Down Expand Up @@ -144,7 +148,8 @@ jobs:
run: |
# Remove artifact prefix from tag so that we get clean image tags
temp="${IMAGE_TAG##klt-}"
echo "IMAGE_TAG=${temp##cert-manager-}" >> "$GITHUB_OUTPUT"
temp="${temp##cert-manager-}"
echo "IMAGE_TAG=${temp##metrics-operator-}" >> "$GITHUB_OUTPUT"
- name: Build Docker Image
id: docker_build_image
Expand Down Expand Up @@ -199,16 +204,16 @@ jobs:
- name: Checkout
uses: actions/checkout@v3

- name: Cache build tools operator
- name: Cache build tools lifecycle-operator
if: needs.release-please.outputs.klt-release-created == 'true'
id: cache-build-tools-operator
id: cache-build-tools-lifecycle-operator
uses: actions/cache@v3
with:
path: ./operator/bin
path: ./lifecycle-operator/bin
key: build-tools-${{ github.ref_name }}

- name: Cache build tools metrics-operator
if: needs.release-please.outputs.klt-release-created == 'true'
if: needs.release-please.outputs.metrics-operator-release-created == 'true'
id: cache-build-tools-metrics-operator
uses: actions/cache@v3
with:
Expand Down Expand Up @@ -245,14 +250,14 @@ jobs:
run: |
cd scheduler
make release-manifests
cd ../operator
cd ../lifecycle-operator
make controller-gen release-manifests
cd ../klt-cert-manager
make controller-gen release-manifests
cd ../metrics-operator
make controller-gen release-manifests
cd ..
echo "---" >> operator/config/rendered/release.yaml
echo "---" >> lifecycle-operator/config/rendered/release.yaml
echo "---" >> scheduler/config/rendered/release.yaml
echo "---" >> klt-cert-manager/config/rendered/release.yaml
cat >> namespace.yaml << EOF
Expand All @@ -264,7 +269,7 @@ jobs:
---
EOF
cat namespace.yaml \
operator/config/rendered/release.yaml \
lifecycle-operator/config/rendered/release.yaml \
scheduler/config/rendered/release.yaml \
klt-cert-manager/config/rendered/release.yaml \
metrics-operator/config/rendered/release.yaml > klt-manifest.yaml
Expand All @@ -279,7 +284,37 @@ jobs:
make controller-gen release-manifests
cd ..
echo "---" >> klt-cert-manager/config/rendered/release.yaml
cat klt-cert-manager/config/rendered/release.yaml > cert-manager-manifest.yaml
cat >> namespace.yaml << EOF
---
apiVersion: v1
kind: Namespace
metadata:
name: keptn-lifecycle-toolkit-system
---
EOF
cat namespace.yaml \
klt-cert-manager/config/rendered/release.yaml > cert-manager-manifest.yaml
- name: Create Metrics Operator manifest
if: needs.release-please.outputs.metrics-operator-release-created == 'true'
env:
RELEASE_REGISTRY: ghcr.io/keptn
CHART_APPVERSION: ${{ needs.release-please.outputs.metrics-operator-tag-name }}
run: |
cd metrics-operator
make controller-gen release-manifests
cd ..
echo "---" >> metrics-operator/config/rendered/release.yaml
cat >> namespace.yaml << EOF
---
apiVersion: v1
kind: Namespace
metadata:
name: keptn-lifecycle-toolkit-system
---
EOF
cat namespace.yaml \
metrics-operator/config/rendered/release.yaml > metrics-operator-manifest.yaml
- name: Attach KLT release assets
if: needs.release-please.outputs.klt-release-created == 'true'
Expand All @@ -295,6 +330,13 @@ jobs:
tag_name: ${{ needs.release-please.outputs.cert-manager-tag-name }}
files: cert-manager-manifest.yaml

- name: Attach Metrics Operator release assets
if: needs.release-please.outputs.metrics-operator-release-created == 'true'
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ needs.release-please.outputs.metrics-operator-tag-name }}
files: metrics-operator-manifest.yaml

update-docs:
name: Update Documentation
needs:
Expand Down
Loading

0 comments on commit 65b6709

Please sign in to comment.