brennerm / uptimerobot-operator

A Kubernetes operator that creates UptimeRobot monitors for your ingresses
MIT License
57 stars 5 forks source link

Unable to create monitor with Basic Auth #30

Open hdp-sami opened 3 years ago

hdp-sami commented 3 years ago

Hi there,

I've been trying to create a new Uptime monitor using the following YAML but I'm getting a validation error stating that the httpAuthSecret field is unknown.

My YAML:

apiVersion: uroperator.brennerm.github.io/v1beta1
kind: UptimeRobotMonitor
metadata:
  name: my-application-monitor
  namespace: public
spec:
  url: "https://exampledomain.com"
  type: HTTPS
  interval: 300
  friendlyName: "My Application Monitor"
  alertContacts: "1234_0_0"
  httpAuthType: BASIC_AUTH
  httpAuthSecret: auth-secret

My create command and error:

$ k create -f uptime-monitor-crd.yaml
error: error validating "uptime-monitor-crd.yaml": error validating data: ValidationError(UptimeRobotMonitor.spec): unknown field "httpAuthSecret" in io.github.brennerm.uroperator.v1beta1.UptimeRobotMonitor.spec; if you choose to ignore these errors, turn validation off with --validate=false

I've installed the operator using Helm by cloning the repository and doing it locally, as the steps listed in the installation steps were failing (I've added that snippet below but that's a different issue).

$ helm repo add uptimerobot-operator https://brennerm.github.io/uptimerobot-operator/helm
$ helm upgrade --install uptimerobot-operator uptimerobot-operator --set uptimeRobotApiKey=1234
Release "uptimerobot-operator" does not exist. Installing it now.
Error: failed to download "uptimerobot-operator" (hint: running `helm repo update` may help)

Am I doing something wrong perhaps? If there's additional information I can provide to you please let me know.

ghost commented 3 years ago

@hdp-sami It looks like the httpAuthSecret is an unreleased feature

https://github.com/brennerm/uptimerobot-operator/blob/25cdca5ec06e15d05ddd5ed4b13b20082fbb8889/CHANGELOG.md#unreleased

It looks like there isn't a newer Docker image available, since the last build was when the last release was prepared, so there is no image you can use to access the httpAuthSecret feature 😞

https://github.com/brennerm/uptimerobot-operator/pkgs/container/uptimerobot-operator/versions

brennerm commented 3 years ago

@domhdp That's exactly the issue here. Will prepare a new release in the next days.

hdp-sami commented 3 years ago

@brennerm I ended up building the image myself to get the new field working. Would still be great to have that release up though πŸ™