Skip to content

Commit

Permalink
migrate repository
Browse files Browse the repository at this point in the history
  • Loading branch information
bennsimon committed Sep 5, 2024
1 parent 43ce869 commit 4076d86
Show file tree
Hide file tree
Showing 14 changed files with 45 additions and 45 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:
id: docker_meta
uses: docker/metadata-action@v4
with:
images: bennsimon/uptimerobot-operator
images: onaio/uptimerobot-operator

- name: Login to DockerHub
uses: docker/login-action@v2
Expand Down
8 changes: 4 additions & 4 deletions PROJECT
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
domain: bennsimon.github.io
domain: onaio.github.io
layout:
- go.kubebuilder.io/v3
projectName: uptimerobot-operator
repo: github.com/bennsimon/uptimerobot-operator
repo: github.com/onaio/uptimerobot-operator
resources:
- controller: true
domain: bennsimon.github.io
group: bennsimon.github.io
domain: onaio.github.io
group: onaio.github.io
kind: Uptimerobot
version: v1
version: "3"
36 changes: 18 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# uptimerobot-operator

[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) [![Go](https://github.com/bennsimon/uptimerobot-operator/actions/workflows/go.yaml/badge.svg?branch=main)](https://github.com/bennsimon/uptimerobot-operator/actions/workflows/go.yaml)
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) [![Go](https://github.com/onaio/uptimerobot-operator/actions/workflows/go.yaml/badge.svg?branch=main)](https://github.com/onaio/uptimerobot-operator/actions/workflows/go.yaml)

The operator creates, updates, deletes uptimerobot monitors for a particular ingress resource. It's designed to use `friendly_name` parameter of a monitor and/or alert contact for unique identification.

## Description

The operator uses [uptimerobot-tooling](https://github.com/bennsimon/uptimerobot-tooling) to handle api requests.
The operator uses [uptimerobot-tooling](https://github.com/onaio/uptimerobot-tooling) to handle api requests.

> The operator will delete the monitor it creates when the ingress resource is deleted.
Expand All @@ -18,9 +18,9 @@ In addition to the environments supplied on the tooling mentioned above, the ope

| Variable | Description | Default |
|-----------------|---------------------------------------------------------|-----------------------|
| `DOMAIN_PREFIX` | The domain name to use when specifying the annotations. | `bennsimon.github.io` |
| `DOMAIN_PREFIX` | The domain name to use when specifying the annotations. | `onaio.github.io` |

With the `DOMAIN_PREFIX` as `bennsimon.github.io` the configurations will be supplied as follows:
With the `DOMAIN_PREFIX` as `onaio.github.io` the configurations will be supplied as follows:

Example 1
```yaml
Expand All @@ -29,13 +29,13 @@ kind: Ingress
metadata:
name: https-minimal-ingress
annotations:
bennsimon.github.io/uptimerobot-monitor: "true"
bennsimon.github.io/uptimerobot-monitor-type: "HTTP"
bennsimon.github.io/uptimerobot-monitor-friendly_name: "tester"
bennsimon.github.io/uptimerobot-monitor-alert_contacts: "tester opsgenie"
bennsimon.github.io/uptimerobot-monitor-interval: "60"
bennsimon.github.io/uptimerobot-monitor-timeout: "30"
# To use more parameters append valid uptimerobot monitor api parameter from https://uptimerobot.com/api/ to the prefix `bennsimon.github.io/uptimerobot-monitor-`
onaio.github.io/uptimerobot-monitor: "true"
onaio.github.io/uptimerobot-monitor-type: "HTTP"
onaio.github.io/uptimerobot-monitor-friendly_name: "tester"
onaio.github.io/uptimerobot-monitor-alert_contacts: "tester opsgenie"
onaio.github.io/uptimerobot-monitor-interval: "60"
onaio.github.io/uptimerobot-monitor-timeout: "30"
# To use more parameters append valid uptimerobot monitor api parameter from https://uptimerobot.com/api/ to the prefix `onaio.github.io/uptimerobot-monitor-`
spec:
rules:
- host: test-domain.localhost
Expand All @@ -52,10 +52,10 @@ spec:
The operator reads configurations of the monitor from the annotation on the ingress resource.
**The first annotation entry `bennsimon.github.io/uptimerobot-monitor` enables the ingress resource to be evaluated by the operator. The other annotations supply the parameters of the monitor. The naming convention is:
`bennsimon.github.io/uptimerobot-monitor-<parameter>`.**
**The first annotation entry `onaio.github.io/uptimerobot-monitor` enables the ingress resource to be evaluated by the operator. The other annotations supply the parameters of the monitor. The naming convention is:
`onaio.github.io/uptimerobot-monitor-<parameter>`.**

**To get more parameters refer to the [tooling documentation](https://github.com/bennsimon/uptimerobot-tooling) and uptimerobot api documentation.**
**To get more parameters refer to the [tooling documentation](https://github.com/onaio/uptimerobot-tooling) and uptimerobot api documentation.**

## Getting Started

Expand Down Expand Up @@ -159,7 +159,7 @@ spec:
# value: "-"
# - name: MONITOR_ALERT_CONTACTS_ATTRIB_DELIMITER
# value: "_"
image: bennsimon/uptimerobot-operator:v0.1.0
image: onaio/uptimerobot-operator:v0.1.0
name: manager
securityContext:
allowPrivilegeEscalation: false
Expand Down Expand Up @@ -197,18 +197,18 @@ spec:

### Running on the cluster

Use the latest tag from [dockerhub](https://hub.docker.com/r/bennsimon/uptimerobot-operator/tags)
Use the latest tag from [dockerhub](https://hub.docker.com/r/onaio/uptimerobot-operator/tags)

1. Build and push your image to the location specified by `IMG`:

```sh
make docker-build docker-push IMG=bennsimon/uptimerobot-operator:v0.1.0
make docker-build docker-push IMG=onaio/uptimerobot-operator:v0.1.0
```

2. Deploy the controller to the cluster with the image specified by `IMG`:

```sh
make deploy IMG=bennsimon/uptimerobot-operator:v0.1.0
make deploy IMG=onaio/uptimerobot-operator:v0.1.0
```

### Uninstall CRDs
Expand Down
4 changes: 2 additions & 2 deletions charts/uptimerobot-operator/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ apiVersion: v2
name: uptimerobot-operator
description: uptimerobot operator creates, updates, deletes uptimerobot monitors for a particular ingress resource. It's designed to use friendly_name attribute of a monitor and/or alert contact for unique identification.
maintainers:
- name: bennsimon
email: [email protected]
- name: onaio
email: [email protected]

# A chart can be either an 'application' or a 'library' chart.
#
Expand Down
6 changes: 3 additions & 3 deletions charts/uptimerobot-operator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ This operator creates, updates, deletes uptimerobot monitors for a particular in
## TL;DR

```bash
$ helm repo add uptimerobot-operator https://bennsimon.github.io/uptimerobot-operator/
$ helm repo add uptimerobot-operator https://onaio.github.io/uptimerobot-operator/
$ helm install uptimerobot-operator uptimerobot-operator/uptimerobot-operator
```

## Introduction

This chart bootstraps [uptimerobot-operator](https://github.com/bennsimon/uptimerobot-operator) deployment on a [Kubernetes](http://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager.
This chart bootstraps [uptimerobot-operator](https://github.com/onaio/uptimerobot-operator) deployment on a [Kubernetes](http://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager.

## Prerequisites

Expand All @@ -32,7 +32,7 @@ The following table lists the configurable parameters of the Uptimerobot-operato
| Parameter | Description | Default |
|----------------------------------------------|-------------|------------------------------------------------------------|
| `replicaCount` | | `1` |
| `image.repository` | | `"bennsimon/uptimerobot-operator"` |
| `image.repository` | | `"onaio/uptimerobot-operator"` |
| `image.pullPolicy` | | `"IfNotPresent"` |
| `image.tag` | | `"v0.1.0"` |
| `imagePullSecrets` | | `[]` |
Expand Down
2 changes: 1 addition & 1 deletion charts/uptimerobot-operator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
replicaCount: 1

image:
repository: bennsimon/uptimerobot-operator
repository: onaio/uptimerobot-operator
pullPolicy: IfNotPresent
# Overrides the image tag whose default is the chart appVersion.
tag: "v0.1.0"
Expand Down
2 changes: 1 addition & 1 deletion config/manager/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
images:
- name: controller
newName: bennsimon/uptimerobot-operator
newName: onaio/uptimerobot-operator
newTag: v0.1.0
4 changes: 2 additions & 2 deletions controllers/uptimerobot_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ package controllers
import (
"context"
"fmt"
"github.com/bennsimon/uptimerobot-operator/util/monitorutil"
"github.com/bennsimon/uptimerobot-tooling/pkg/util/httputil"
"github.com/onaio/uptimerobot-operator/util/monitorutil"
"github.com/onaio/uptimerobot-tooling/pkg/util/httputil"
"sigs.k8s.io/controller-runtime/pkg/builder"
"sigs.k8s.io/controller-runtime/pkg/event"
"sigs.k8s.io/controller-runtime/pkg/predicate"
Expand Down
2 changes: 1 addition & 1 deletion controllers/uptimerobot_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package controllers
import (
"context"
"errors"
"github.com/bennsimon/uptimerobot-operator/util/monitorutil"
"github.com/onaio/uptimerobot-operator/util/monitorutil"
"github.com/stretchr/testify/mock"
network "k8s.io/api/networking/v1"
"k8s.io/apimachinery/pkg/runtime"
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
module github.com/bennsimon/uptimerobot-operator
module github.com/onaio/uptimerobot-operator

go 1.19

require (
github.com/bennsimon/uptimerobot-tooling v0.0.0-20221124193043-367c42529da1
github.com/onaio/uptimerobot-tooling v0.0.1
github.com/onsi/ginkgo/v2 v2.1.4
github.com/onsi/gomega v1.19.0
github.com/stretchr/testify v1.7.0
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,6 @@ github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk5
github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY=
github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8=
github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA=
github.com/bennsimon/uptimerobot-tooling v0.0.0-20221124193043-367c42529da1 h1:2sTcIebT1h0sFK9PFW0TujPYD/zu1MvC9M3QvoXjq5Y=
github.com/bennsimon/uptimerobot-tooling v0.0.0-20221124193043-367c42529da1/go.mod h1:FS8Y60FqInjY4yA++lD+pK5+4qi5SxhZnzj7UZpawY0=
github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=
github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8=
github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
Expand Down Expand Up @@ -278,6 +276,8 @@ github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRW
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs=
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno=
github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE=
github.com/onaio/uptimerobot-tooling v0.0.1 h1:uHPopfAqLbvdt8QYtmNYawIxf40mH/Lq7EM/Tx+EdVA=
github.com/onaio/uptimerobot-tooling v0.0.1/go.mod h1:AI5nAE8UcbOcOVz818500Fpi1uWYhpa985jSubAnGwo=
github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE=
github.com/onsi/ginkgo/v2 v2.1.4 h1:GNapqRSid3zijZ9H77KrgVG4/8KqiyRsxcSxe+7ApXY=
github.com/onsi/ginkgo/v2 v2.1.4/go.mod h1:um6tUpWM/cxCK3/FK8BXqEiUMUwRgSM4JXG47RKZmLU=
Expand Down
4 changes: 2 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import (
"sigs.k8s.io/controller-runtime/pkg/healthz"
"sigs.k8s.io/controller-runtime/pkg/log/zap"

"github.com/bennsimon/uptimerobot-operator/controllers"
"github.com/onaio/uptimerobot-operator/controllers"
//+kubebuilder:scaffold:imports
)

Expand Down Expand Up @@ -69,7 +69,7 @@ func main() {
Port: 9443,
HealthProbeBindAddress: probeAddr,
LeaderElection: enableLeaderElection,
LeaderElectionID: "b6c1f3bb.bennsimon.github.io",
LeaderElectionID: "b6c1f3bb.onaio.github.io",
// LeaderElectionReleaseOnCancel defines if the leader should step down voluntarily
// when the Manager ends. This requires the binary to immediately end when the
// Manager is stopped, otherwise, this setting is unsafe. Setting this significantly
Expand Down
8 changes: 4 additions & 4 deletions util/monitorutil/monitorutil.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ package monitorutil

import (
"errors"
"github.com/bennsimon/uptimerobot-tooling/pkg/model"
"github.com/bennsimon/uptimerobot-tooling/pkg/service"
"github.com/bennsimon/uptimerobot-tooling/pkg/service/monitor"
"github.com/onaio/uptimerobot-tooling/pkg/model"
"github.com/onaio/uptimerobot-tooling/pkg/service"
"github.com/onaio/uptimerobot-tooling/pkg/service/monitor"
"os"
"strings"
)
Expand Down Expand Up @@ -60,7 +60,7 @@ func GetUptimeRobotDomain() string {
prefixStr := "/" + AnnotationPrefix
envPrefix := getUptimeRobotDomain()
if len(envPrefix) == 0 {
return "bennsimon.github.io" + prefixStr
return "onaio.github.io" + prefixStr
}
return envPrefix + prefixStr
}
Expand Down
4 changes: 2 additions & 2 deletions util/monitorutil/monitorutil_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ package monitorutil

import (
"errors"
"github.com/bennsimon/uptimerobot-tooling/pkg/model"
"github.com/bennsimon/uptimerobot-tooling/pkg/service"
"github.com/onaio/uptimerobot-tooling/pkg/model"
"github.com/onaio/uptimerobot-tooling/pkg/service"
"github.com/stretchr/testify/mock"
"reflect"
"testing"
Expand Down

0 comments on commit 4076d86

Please sign in to comment.