Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding support for AliCloud monitor #626

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

chriskery
Copy link

Adding support for AliCloud monitor.
Refer to : https://www.alibabacloud.com/help/en/cms/user-guide/site-monitoring/

@karl-johan-grahn karl-johan-grahn added the ok-to-test Run tests in PR workflows label Jan 8, 2025
@karl-johan-grahn
Copy link
Contributor

Just to clarify, this will require us to create an account with Alibaba to run the tests? We need to specify this in our config:

- name: AliCloud
    apiKey: <ACCESS KEY>
    apiToken: <SECRET KEY>
    apiURL: "metrics.cn-qingdao.aliyuncs.com"

@chriskery
Copy link
Author

Just to clarify, this will require us to create an account with Alibaba to run the tests? We need to specify this in our config:

- name: AliCloud
    apiKey: <ACCESS KEY>
    apiToken: <SECRET KEY>
    apiURL: "metrics.cn-qingdao.aliyuncs.com"

yes, we need a alibabaCloud account, then use the account's access creadentials to interact (AKSK). My local test output is :

cyw@U-6KPY61TW-0044:s019->/Users/cyw/GolandProjects/IngressMonitorController (0) git:(alicloud_monitor_intergrate) 
> export CONFIG_FILE_PATH=$(pwd)/.local/test-config.yaml
git:(alicloud_monitor_intergrate) 
cyw@U-6KPY61TW-0044:s019->/Users/cyw/GolandProjects/IngressMonitorController (0) git:(alicloud_monitor_intergrate) 
> make test
mkdir -p /Users/cyw/GolandProjects/IngressMonitorController/bin
GOBIN=/Users/cyw/GolandProjects/IngressMonitorController/bin go install sigs.k8s.io/controller-tools/cmd/[email protected]
/Users/cyw/GolandProjects/IngressMonitorController/bin/controller-gen object:headerFile="hack/boilerplate.go.txt" paths="./..."
go fmt ./...
go vet ./...
/Users/cyw/GolandProjects/IngressMonitorController/bin/controller-gen rbac:roleName=manager-role crd webhook paths="./..." output:crd:artifacts:config=config/crd/bases
GOBIN=/Users/cyw/GolandProjects/IngressMonitorController/bin go install sigs.k8s.io/controller-runtime/tools/setup-envtest@latest
go: downloading sigs.k8s.io/controller-runtime/tools/setup-envtest v0.0.0-20250109154033-1de5a3e8bae9
go: downloading sigs.k8s.io/controller-runtime v0.19.4
go: sigs.k8s.io/controller-runtime/tools/[email protected] requires go >= 1.23.0; switching to go1.23.4
/Users/cyw/GolandProjects/IngressMonitorController/bin/setup-envtest use -p path 1.28.x!
/Users/cyw/Library/Application Support/io.kubebuilder.envtest/k8s/1.28.3-darwin-arm64go test ./... -count=1 -coverprofile cover.out
?       github.com/stakater/IngressMonitorController/v2 [no test files]
?       github.com/stakater/IngressMonitorController/v2/api/v1alpha1    [no test files]
?       github.com/stakater/IngressMonitorController/v2/pkg/controllers [no test files]
?       github.com/stakater/IngressMonitorController/v2/pkg/kube        [no test files]
?       github.com/stakater/IngressMonitorController/v2/pkg/kube/util   [no test files]
?       github.com/stakater/IngressMonitorController/v2/pkg/models      [no test files]
ok      github.com/stakater/IngressMonitorController/v2/pkg/config      0.414s  coverage: 24.5% of statements
ok      github.com/stakater/IngressMonitorController/v2/pkg/http        1.638s  coverage: 71.4% of statements
ok      github.com/stakater/IngressMonitorController/v2/pkg/kube/wrappers       1.098s  coverage: 50.8% of statements
ok      github.com/stakater/IngressMonitorController/v2/pkg/monitors    1.367s  coverage: 8.3% of statements
?       github.com/stakater/IngressMonitorController/v2/pkg/secret      [no test files]
?       github.com/stakater/IngressMonitorController/v2/pkg/util        [no test files]
ok      github.com/stakater/IngressMonitorController/v2/pkg/monitors/alicloud   8.233s  coverage: 59.7% of statements
ok      github.com/stakater/IngressMonitorController/v2/pkg/monitors/appinsights        2.088s  coverage: 32.7% of statements
ok      github.com/stakater/IngressMonitorController/v2/pkg/monitors/gcloud     2.440s  coverage: 0.0% of statements [no tests to run]
ok      github.com/stakater/IngressMonitorController/v2/pkg/monitors/grafana    1.940s  coverage: 0.0% of statements
ok      github.com/stakater/IngressMonitorController/v2/pkg/monitors/pingdom    2.280s  coverage: 0.0% of statements
ok      github.com/stakater/IngressMonitorController/v2/pkg/monitors/pingdomtransaction 2.541s  coverage: 14.5% of statements
ok      github.com/stakater/IngressMonitorController/v2/pkg/monitors/statuscake 2.899s  coverage: 18.9% of statements
ok      github.com/stakater/IngressMonitorController/v2/pkg/monitors/updown     3.062s  coverage: 0.0% of statements
ok      github.com/stakater/IngressMonitorController/v2/pkg/monitors/uptime     2.930s  coverage: 11.8% of statements
ok      github.com/stakater/IngressMonitorController/v2/pkg/monitors/uptimerobot        2.852s  coverage: 5.5% of statements

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ok-to-test Run tests in PR workflows
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants