Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
exoscale/dbaas-api#296 # Description <!-- * Prefix: the title with the component name being changed. Add a short and self describing sentence to ease the review * Please add a few lines providing context and describing the change * Please self comment changes whenever applicable to help with the review process * Please keep the checklist as part of the PR. Tick what applies to this change. --> ## Checklist (For exoscale contributors) * [x] Changelog updated (under *Unreleased* block) * [x] Testing ## Testing ```bash go run . dbaas external-endpoint create datadog cli-test-name-6 \ --datadog-api-key asdfasdfsadfasd \ --datadog-site datadoghq.eu \ --datadog-tags '[{"comment": "blabla","tag":"sometag"}]' ✔ Creating DBaaS Datadog external Endpoint "cli-test-name-6" 0s ┼────────────────────────────────┼──────────────────────────────────────┼ │ DATADOG EXTERNAL ENDPOINT │ │ ┼────────────────────────────────┼──────────────────────────────────────┼ │ Endpoint ID │ c15f1766-2321-4684-b9a8-c7bcca22949c │ │ Endpoint Name │ cli-test-name-6 │ │ Endpoint Type │ datadog │ │ Datadog API Key │ asdfasdfsadfasd │ │ Site │ datadoghq.eu │ │ Disable Consumer Stats │ false │ │ Kafka Consumer Check Instances │ 0 │ │ Kafka Consumer Stats Timeout │ 0 │ │ Max Partition Contexts │ 0 │ │ Datadog Tags │ sometag (blabla) │ ┼────────────────────────────────┼──────────────────────────────────────┼ ``` ``` go run . dbaas external-endpoint show datadog e87cdc43-a902-4e46-80d1-22e2bc97931a ┼────────────────────────────────┼──────────────────────────────────────┼ │ DATADOG EXTERNAL ENDPOINT │ │ ┼────────────────────────────────┼──────────────────────────────────────┼ │ Endpoint ID │ e87cdc43-a902-4e46-80d1-22e2bc97931a │ │ Endpoint Name │ cli-test-name-4 │ │ Endpoint Type │ datadog │ │ Datadog API Key │ asdfasdfsadfasd │ │ Site │ datadoghq.eu │ │ Disable Consumer Stats │ false │ │ Kafka Consumer Check Instances │ 0 │ │ Kafka Consumer Stats Timeout │ 0 │ │ Max Partition Contexts │ 0 │ │ Datadog Tags │ sometag (blabla) │ ┼────────────────────────────────┼──────────────────────────────────────┼ ``` ```bash go run . dbaas external-endpoint create opensearch cli-test-name-opensearch \ --opensearch-ca "-----BEGIN CERTIFICATE----- .... -----END CERTIFICATE-----" \ --opensearch-index-days-max 30 \ --opensearch-index-prefix "logs-" \ --opensearch-timeout 30 \ --opensearch-url "https://some-opensearch-cluster.com:9200" ✔ Creating DBaaS OpenSearch external Endpoint "cli-test-name-opensearch" 0s ┼──────────────────────────────┼──────────────────────────────────────────┼ │ OPENSEARCH EXTERNAL ENDPOINT │ │ ┼──────────────────────────────┼──────────────────────────────────────────┼ │ Endpoint ID │ a1b175a4-27eb-4c9a-8bbd-5b03cd5d5c6f │ │ Endpoint Name │ cli-test-name-opensearch │ │ Endpoint Type │ opensearch │ │ OpenSearch URL │ https://some-opensearch-cluster.com:9200 │ │ Index Prefix │ logs- │ │ CA Certificate │ -----BEGIN CERTIFICATE----- │ │ │ MIICnTCCAiSgAwIBAgIMCL... │ │ Index Days Max │ 30 │ │ Timeout │ 30 │ ┼──────────────────────────────┼──────────────────────────────────────────┼ ``` ```bash go run . dbaas external-endpoint create prometheus cli-prometheus \ --prometheus-basic-auth-username prom-username \ --prometheus-basic-auth-password super-strong-secret ✔ Creating DBaaS Prometheus external Endpoint "cli-prometheus" 0s ┼──────────────────────────────┼──────────────────────────────────────┼ │ PROMETHEUS EXTERNAL ENDPOINT │ │ ┼──────────────────────────────┼──────────────────────────────────────┼ │ Endpoint ID │ eab185cf-8adc-4a72-9dec-39a01c08df7e │ │ Endpoint Name │ cli-prometheus │ │ Endpoint Type │ prometheus │ │ Basic Auth Username │ prom-username │ │ Basic Auth Password │ super-strong-secret │ ┼──────────────────────────────┼──────────────────────────────────────┼ ``` ```bash go run . dbaas external-endpoint show prometheus 0ffa5b3c-bde4-4888-b9f2-1bcdbf0f8c9f ┼──────────────────────────────┼──────────────────────────────────────┼ │ PROMETHEUS EXTERNAL ENDPOINT │ │ ┼──────────────────────────────┼──────────────────────────────────────┼ │ Endpoint ID │ 0ffa5b3c-bde4-4888-b9f2-1bcdbf0f8c9f │ │ Endpoint Name │ prom-settings │ │ Endpoint Type │ prometheus │ │ Basic Auth Username │ something │ │ Basic Auth Password │ fantastickkk │ ┼──────────────────────────────┼──────────────────────────────────────┼ ``` ```bash go run . dbaas external-endpoint create rsyslog create-rsyslog-demo \ --rsyslog-ca "$(openssl req -x509 -newkey rsa:4096 -keyout /dev/null -out /dev/stdout -days 365 -nodes -subj '/CN=DemoCA' 2>/dev/null)" \ --rsyslog-cert "$(openssl req -x509 -newkey rsa:4096 -keyout /dev/null -out /dev/stdout -days 365 -nodes -subj '/CN=DemoClient' 2>/dev/null)" \ --rsyslog-format "rfc5424" \ --rsyslog-key "$(openssl genpkey -algorithm RSA -out /dev/stdout 2>/dev/null)" \ --rsyslog-logline "%<PRIORITY>%<VERSION> %<TIMESTAMP> %<HOSTNAME> %<APP-NAME> %<PROCID> %<MSGID> %<MESSAGE>" \ --rsyslog-max-message-size 1000000000 \ --rsyslog-port 40404 \ --rsyslog-sd "something" \ --rsyslog-server "192.168.55.5" \ --rsyslog-tls ✔ Creating DBaaS Rsyslog external Endpoint "create-rsyslog-demo" 0s ┼───────────────────────────┼──────────────────────────────────────────────────────────────────────────────────────────┼ │ RSYSLOG EXTERNAL ENDPOINT │ │ ┼───────────────────────────┼──────────────────────────────────────────────────────────────────────────────────────────┼ │ Endpoint ID │ ae4af2ae-7367-462d-a0ad-bdbde9153f28 │ │ Endpoint Name │ create-rsyslog-demo │ │ Endpoint Type │ rsyslog │ │ Server │ 192.168.55.5 │ │ Port │ 40404 │ │ Tls │ true │ │ CA Certificate │ -----BEGIN CERTIFICATE----- │ │ │ MIIE0TCCArmgAwIBAgIUZc... │ │ Client Certificate │ -----BEGIN CERTIFICATE----- │ │ │ MIIE2TCCAsGgAwIBAgIUS1... │ │ Client Key │ -----BEGIN PRIVATE KEY----- │ │ │ MIIEvAIBADANBgkqhkiG9w... │ │ Max Message Size │ 1000000000 │ │ Structured data block │ something │ │ Custom logline format │ %<PRIORITY>%<VERSION> %<TIMESTAMP> %<HOSTNAME> %<APP-NAME> %<PROCID> %<MSGID> %<MESSAGE> │ │ Custom logline format │ %<PRIORITY>%<VERSION> %<TIMESTAMP> %<HOSTNAME> %<APP-NAME> %<PROCID> %<MSGID> %<MESSAGE> │ ┼───────────────────────────┼──────────────────────────────────────────────────────────────────────────────────────────┼ ``` <!-- Describe the tests you did -->
- Loading branch information