Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: stakater/IngressMonitorController
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v2.1.63
Choose a base ref
...
head repository: stakater/IngressMonitorController
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref

Commits on Jul 31, 2024

  1. Copy the full SHA
    15f803d View commit details

Commits on Aug 28, 2024

  1. Alert sensitivity grafana cloud (#604)

    * Alert sensitivity grafana cloud
    
    * Add alert sens to test
    
    * Add description
    
    * Add description
    
    * Add description
    MuneebAijaz authored Aug 28, 2024
    Copy the full SHA
    b6c00b2 View commit details
  2. Copy the full SHA
    1b5a3a2 View commit details
  3. Copy the full SHA
    0f634b5 View commit details

Commits on Sep 17, 2024

  1. update (#606)

    karl-johan-grahn authored Sep 17, 2024
    Copy the full SHA
    29669dd View commit details

Commits on Oct 4, 2024

  1. Copy the full SHA
    e4596fb View commit details
  2. Copy the full SHA
    30c9cbb View commit details
  3. Copy the full SHA
    91b5b8b View commit details
  4. Copy the full SHA
    b4c2ecf View commit details
  5. Update base crds

    matthijswolters-rl committed Oct 4, 2024
    Copy the full SHA
    49046b8 View commit details
  6. Copy the full SHA
    b64294a View commit details
  7. Update CRDs

    matthijswolters-rl committed Oct 4, 2024
    Copy the full SHA
    4a667f0 View commit details
  8. update (#611)

    karl-johan-grahn authored Oct 4, 2024
    Copy the full SHA
    2001476 View commit details

Commits on Oct 7, 2024

  1. Copy the full SHA
    c862ace View commit details

Commits on Oct 30, 2024

  1. fix(deps): update module github.com/stretchr/testify to v1.9.0 (#582)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Oct 30, 2024
    Copy the full SHA
    bce64f5 View commit details

Commits on Nov 7, 2024

  1. Copy the full SHA
    668547b View commit details

Commits on Nov 20, 2024

  1. fix(deps): update google.golang.org/genproto/googleapis/api digest to…

    … e639e21 (#613)
    
    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Nov 20, 2024
    Copy the full SHA
    18056df View commit details

Commits on Nov 21, 2024

  1. Merge pull request #609 from RosemanLabs/upstream/add-statuscake-config

    Statuscake: Add raw_post_data and user_agent
    SheryarButt authored Nov 21, 2024
    Copy the full SHA
    6b29093 View commit details
  2. Copy the full SHA
    7aac31d View commit details

Commits on Nov 25, 2024

  1. Statuscake: read basicauth password straight from secret (#608)

    * WIP add config option
    
    * Update controller-gen version
    
    Fixes the broken v0.9 of controller-gen because it causes a segfault
    when running `make install`
    
    * Update formatting for base CRDS
    
    * Working read secret
    
    * Fixed read secret
    
    * Use new secret function not client function
    
    * Revert random formatting changes
    
    * More stupid formatting fixes
    
    * Final formatting fixes
    
    I don't like formatting :(
    
    * Small fixes and docs update
    
    * Update example
    
    * Update CRDs
    
    * Revert controller-gen version bump
    
    This is so that my upstream PR just focuses on the important bits rather
    than mixing changes
    
    * Fix annotation #1
    
    * Update annotations #1.1
    
    * Update annotations #2
    
    * Include explicit checking of keys
    matthijswolters-rl authored Nov 25, 2024
    Copy the full SHA
    6100e17 View commit details
  2. Copy the full SHA
    8cc3d8b View commit details

Commits on Dec 4, 2024

  1. Statuscake: Implement Equals function using TestTags (#610)

    * Implement Equals function using TestTags
    
    It is mentioned in a comment in the code itself but because of the
    discrepency between the fields in the EndpointMonitor CR and the
    Statuscake API it is not immediately clear how to compare an old monitor
    with an updated monitor. The way I have elected to check this is to use
    the TestTags field to include some kind of identifier that should be
    updated on any change. So if the tags have changed then the monitor
    should be updated.
    
    * Remove already merged content
    matthijswolters-rl authored Dec 4, 2024
    Copy the full SHA
    7a3f1d0 View commit details
  2. adding doRequest function to handle StatusCake connection and avoid r…

    …atelimits. (#617)
    
    Co-authored-by: Igor Loginov <igor.loginov@b2broker.com>
    evilgn0me and evilgn0me authored Dec 4, 2024
    Copy the full SHA
    f2d117a View commit details

Commits on Dec 9, 2024

  1. chore(deps): update golangci/golangci-lint-action action to v6 (#616)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Dec 9, 2024
    Copy the full SHA
    27443ef View commit details

Commits on Dec 11, 2024

  1. chore(deps): update docker/build-push-action action to v6 (#615)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Dec 11, 2024
    Copy the full SHA
    6354179 View commit details

Commits on Dec 13, 2024

  1. Fix recursion in statuscake code (#619)

    * Fix recusion in statuscake code
    
    * increase freq in grafana tests
    MuneebAijaz authored Dec 13, 2024
    Copy the full SHA
    96cea5e View commit details
  2. Copy the full SHA
    78a9718 View commit details
  3. Copy the full SHA
    94c1bbb View commit details

Commits on Dec 17, 2024

  1. Fix incorrect encoding of health endpoint (#618)

    * Fix incorrect encoding of health endpoint
    karl-johan-grahn authored Dec 17, 2024
    Copy the full SHA
    de25bb8 View commit details
  2. Copy the full SHA
    86a40ae View commit details

Commits on Dec 24, 2024

  1. Add support for retries in uptimerobot (#625)

    * Add support for retries in uptimerobot
    
    * #minor bump
    MuneebAijaz authored Dec 24, 2024
    Copy the full SHA
    18239ff View commit details
  2. Copy the full SHA
    dbd3c31 View commit details
89 changes: 7 additions & 82 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Pull Request

on:
pull_request_target:
pull_request:
branches:
- 'master'
paths-ignore:
@@ -14,7 +14,6 @@ env:
DOCKER_FILE_PATH: Dockerfile
GOLANG_VERSION: 1.21
HELM_VERSION: v3.8.2
KIND_VERSION: "v0.17.0"
REGISTRY: ghcr.io

jobs:
@@ -34,7 +33,7 @@ jobs:
go-version: ${{ env.GOLANG_VERSION }}

- name: Lint
uses: golangci/golangci-lint-action@v3
uses: golangci/golangci-lint-action@v6
with:
version: v1.54
only-new-issues: false
@@ -50,27 +49,6 @@ jobs:
run: |
helm lint charts/ingressmonitorcontroller
- name: Install kind
uses: engineerd/setup-kind@v0.5.0
with:
version: ${{ env.KIND_VERSION }}

- name: Check cluster info
run: |
kubectl version --client
kind version
kind version | grep -q ${KIND_VERSION}
- name: Set up Cluster
run: |
kubectl cluster-info
make install
mkdir -p .local
echo "${{ secrets.SECRET_KUBERNETES_RESOURCES }}" | base64 --decode > .local/test-config.yaml
- name: Test
run: make test

- name: Generate Tag
id: generate_tag
run: |
@@ -86,24 +64,19 @@ jobs:
with:
buildkitd-flags: --debug

- name: Login to ghcr registry
uses: docker/login-action@v3
with:
registry: ${{env.REGISTRY}}
username: stakater-user
password: ${{secrets.GITHUB_TOKEN}}

- name: Generate image repository path for ghcr registry
run: |
echo GHCR_IMAGE_REPOSITORY=${{env.REGISTRY}}/$(echo ${{ github.repository }} | tr '[:upper:]' '[:lower:]') >> $GITHUB_ENV
- name: Build and Push image to ghcr registry
uses: docker/build-push-action@v5
# To identify any broken changes in dockerfiles or dependencies

- name: Build image
uses: docker/build-push-action@v6
with:
context: .
file: ${{ env.DOCKER_FILE_PATH }}
pull: true
push: true
push: false
cache-from: type=gha
cache-to: type=gha,mode=max
build-args: BUILD_PARAMETERS=${{ env.BUILD_PARAMETERS }}
@@ -112,52 +85,4 @@ jobs:
${{ env.GHCR_IMAGE_REPOSITORY }}:${{ steps.generate_tag.outputs.GIT_TAG }}
labels: |
org.opencontainers.image.source=${{ github.event.repository.clone_url }}
org.opencontainers.image.created=${{ steps.prep.outputs.created }}
org.opencontainers.image.revision=${{ github.sha }}
- name: Login to DockerHub Registry
uses: docker/login-action@v3
with:
username: ${{ secrets.STAKATER_DOCKERHUB_USERNAME }}
password: ${{ secrets.STAKATER_DOCKERHUB_PASSWORD }}

- name: Generate image repository path for dockerhub registry
run: |
echo IMAGE_REPOSITORY=$(echo ${{ github.repository }} | tr '[:upper:]' '[:lower:]') >> $GITHUB_ENV
- name: Build and push to DockerHub registry
uses: docker/build-push-action@v5
with:
context: .
file: ${{ env.DOCKER_FILE_PATH }}
pull: true
push: true
build-args: BUILD_PARAMETERS=${{ env.BUILD_PARAMETERS }}
cache-from: type=gha
cache-to: type=gha,mode=max
platforms: linux/amd64,linux/arm,linux/arm64
tags: |
${{ env.IMAGE_REPOSITORY }}:${{ steps.generate_tag.outputs.GIT_TAG }}
labels: |
org.opencontainers.image.source=${{ github.event.repository.clone_url }}
org.opencontainers.image.created=${{ steps.prep.outputs.created }}
org.opencontainers.image.revision=${{ github.sha }}
- name: Comment on PR
uses: mshick/add-pr-comment@v2
if: always()
env:
GITHUB_TOKEN: ${{ secrets.STAKATER_GITHUB_TOKEN }}
with:
message-success: '@${{ github.actor }} Image is available for testing. `docker pull ${{ env.IMAGE_REPOSITORY }}:${{ steps.generate_tag.outputs.GIT_TAG }}`'
message-failure: '@${{ github.actor }} Yikes! You better fix it before anyone else finds out! [Build](https://github.com/${{ github.repository }}/commit/${{ github.event.pull_request.head.sha }}/checks) has Failed!'
allow-repeats: false

- name: Notify Slack
uses: 8398a7/action-slack@v3
if: always() # Pick up events even if the job fails or is canceled.
with:
status: ${{ job.status }}
fields: repo,author,action,eventName,ref,workflow
env:
SLACK_WEBHOOK_URL: ${{ secrets.STAKATER_DELIVERY_SLACK_WEBHOOK }}
61 changes: 61 additions & 0 deletions .github/workflows/pull_request_test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Run Tests on PR Label

on:
pull_request:
branches:
- 'master'
paths-ignore:
- '*.md'
- 'docs/'
- 'examples/'
- 'hack/'
- 'config/'
types: [ labeled ]

env:
KIND_VERSION: "v0.25.0"
GOLANG_VERSION: 1.21

jobs:

test:
runs-on: ubuntu-latest
name: Test
if: ${{ github.event.label.name == 'ok-to-test' }}
steps:

- name: Remove the test label
uses: actions-ecosystem/action-remove-labels@v1
with:
labels: ok-to-test

- name: Check out code
uses: actions/checkout@v4
with:
ref: ${{github.event.pull_request.head.sha}}

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: ${{ env.GOLANG_VERSION }}

- name: Install kind
uses: engineerd/setup-kind@v0.5.0
with:
version: ${{ env.KIND_VERSION }}

- name: Check cluster info
run: |
kubectl version --client
kind version
kind version | grep -q ${KIND_VERSION}
- name: Set up Cluster
run: |
kubectl cluster-info
make install
mkdir -p .local
echo "${{ secrets.IMC_GITHUB_PIPELINE_CONFIG_ENCODED }}" | base64 --decode > .local/test-config.yaml
- name: Test
run: make test
18 changes: 9 additions & 9 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
@@ -42,7 +42,7 @@ jobs:
go-version: ${{ env.GOLANG_VERSION }}

- name: Lint
uses: golangci/golangci-lint-action@v3
uses: golangci/golangci-lint-action@v6
with:
version: v1.54
only-new-issues: false
@@ -74,7 +74,7 @@ jobs:
kubectl cluster-info
make install
mkdir -p .local
echo "${{ secrets.SECRET_KUBERNETES_RESOURCES }}" | base64 --decode > .local/test-config.yaml
echo "${{ secrets.IMC_GITHUB_PIPELINE_CONFIG_ENCODED }}" | base64 --decode > .local/test-config.yaml
- name: Test
run: make test
@@ -108,7 +108,7 @@ jobs:
echo GHCR_IMAGE_REPOSITORY=${{env.REGISTRY}}/$(echo ${{ github.repository }} | tr '[:upper:]' '[:lower:]') >> $GITHUB_ENV
- name: Build and Push image to ghcr registry
uses: docker/build-push-action@v5
uses: docker/build-push-action@v6
with:
context: .
file: ${{ env.DOCKER_FILE_PATH }}
@@ -136,7 +136,7 @@ jobs:
echo IMAGE_REPOSITORY=$(echo ${{ github.repository }} | tr '[:upper:]' '[:lower:]') >> $GITHUB_ENV
- name: Build and push image to DockerHub registry
uses: docker/build-push-action@v5
uses: docker/build-push-action@v6
with:
context: .
file: ${{ env.DOCKER_FILE_PATH }}
@@ -162,7 +162,7 @@ jobs:
id: generate_operator_tag
uses: anothrNick/github-tag-action@1.61.0
env:
GITHUB_TOKEN: ${{ secrets.STAKATER_GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.PUBLISH_TOKEN }}
WITH_V: false
DEFAULT_BUMP: patch
DRY_RUN: true
@@ -190,7 +190,7 @@ jobs:
run: operator-sdk bundle validate ./bundle --select-optional name=operatorhub

- name: Build and push Bundle Image
uses: docker/build-push-action@v5
uses: docker/build-push-action@v6
with:
context: .
file: ${{ env.BUNDLE_DOCKER_FILE_PATH }}
@@ -220,7 +220,7 @@ jobs:
branch: master
repository: stakater-charts
target_dir: docs
token: ${{ secrets.STAKATER_GITHUB_TOKEN }}
token: ${{ secrets.GHCR_TOKEN }}
charts_dir: charts/
charts_url: ${{ env.HELM_REGISTRY_URL }}
owner: stakater
@@ -240,13 +240,13 @@ jobs:
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.STAKATER_GITHUB_TOKEN }}
github_token: ${{ secrets.PUBLISH_TOKEN }}

# Push Latest Tag
- name: Push Latest Tag
uses: anothrNick/github-tag-action@1.61.0
env:
GITHUB_TOKEN: ${{ secrets.STAKATER_GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.PUBLISH_TOKEN }}
WITH_V: true
DEFAULT_BUMP: patch

1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
vendor
.idea
\.vscode/
out
/IngressMonitorController
/build/_output/bin/
19 changes: 19 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Launch Package",
"type": "go",
"request": "launch",
"mode": "auto",
"program": "${workspaceFolder}/main.go",
"env": {
"OPERATOR_NAMESPACE": "stakater-ingress-monitor-controller"
}
}

]
}
18 changes: 18 additions & 0 deletions api/v1alpha1/endpointmonitor_types.go
Original file line number Diff line number Diff line change
@@ -163,6 +163,10 @@ type StatusCakeConfig struct {
// +optional
BasicAuthUser string `json:"basicAuthUser,omitempty"`

// Basic Auth Secret Name
// +optional
BasicAuthSecret string `json:"basicAuthSecret,omitempty"`

// Set Check Rate for the monitor
// +optional
CheckRate int `json:"checkRate,omitempty"`
@@ -224,6 +228,14 @@ type StatusCakeConfig struct {
// String to look for within the response. Considered down if not found
// +optional
FindString string `json:"findString,omitempty"`

// RawPostData can be used to send parameters within the URL. Changes the request from a GET to a POST
// +optional
RawPostData string `json:"rawPostData,omitempty"`

// UserAgent is used to set a user agent string.
// +optional
UserAgent string `json:"userAgent,omitempty"`
}

// PingdomConfig defines the configuration for Pingdom Monitor Provider
@@ -394,6 +406,12 @@ type GrafanaConfig struct {
// or services. These agents periodically send requests to predefined URLs and record the responses,
// checking for expected outcomes and measuring performance.
Probes []string `json:"probes,omitempty"`

// The alertSensitivity value defaults to none if there are no alerts or can be set to low, medium,
// or high to correspond to the check alert levels.
// +kubebuilder:validation:Enum=none;low;medium;high
// +kubebuilder:default=none
AlertSensitivity string `json:"alertSensitivity,omitempty"`
}

// URLSource represents the set of resources to fetch the URL from
Original file line number Diff line number Diff line change
@@ -62,6 +62,17 @@ spec:
grafanaConfig:
description: Configuration for Grafana Cloud Monitor Provider
properties:
alertSensitivity:
default: none
description: The alertSensitivity value defaults to none if there
are no alerts or can be set to low, medium, or high to correspond
to the check alert levels.
enum:
- none
- low
- medium
- high
type: string
frequency:
description: The frequency value specifies how often the check
runs in milliseconds
@@ -243,6 +254,9 @@ spec:
statusCakeConfig:
description: Configuration for StatusCake Monitor Provider
properties:
basicAuthSecret:
description: Basic Auth Secret Name
type: string
basicAuthUser:
description: Basic Auth User
type: string
@@ -276,6 +290,10 @@ spec:
port:
description: TCP Port
type: integer
rawPostData:
description: RawPostData can be used to send parameters within
the URL. Changes the request from a GET to a POST
type: string
realBrowser:
description: Enable Real Browser
type: boolean
@@ -295,6 +313,9 @@ spec:
triggerRate:
description: Minutes to wait before sending an alert
type: integer
userAgent:
description: UserAgent is used to set a user agent string.
type: string
type: object
updownConfig:
description: Configuration for Updown Monitor Provider
Loading