sxcollectorConfig

This resource allow you to set a configuration profile usable by other runnable sxcollector instances like SxcollectorDaemon, SxcollectorSchedule or SxcollectorTask.

Usage

Requirements

Be sure you have a cluster with sxcollector-operator installed.

Examples

YAML examples

All example
---
apiVersion: sxcollector.operator.startx.fr/v1alpha1
kind: SxcollectorConfig
metadata:
  name: all-example
  namespace: sxcollector
spec:
  configType: all
  generic:
    debug: true
    insecure: true
  confluence:
    url: https://example.atlassian.net/wiki
    username: user@example.com
    token: xxxxxxxxmytokenxxxxxxxxxxx
    spaceKey: SPACEKEY
    title: "My SXCollector page"
    content: "<h2>Add an introduction</h2>"
    parentId: "123456"
    pageId: "123456789"
  gsheet:
    spreadsheetId: "xxxxxxxxxxxx"
    spreadsheetTitle: "My New SXCollector Spreadsheet"
    sheetTitle: "SXCollectorSheet"
    credsFilename: "credentials.json"
    credsPath: "/tmp"
    credsDomain: "google.com"
  mail:
    smtpHost: "smtp.example.com"
    smtpPort: 25
    smtpUsername: sender@example.com
    smtpPassword: "senderPassW0rd"
    smtpInsecure: true
    from: sender@example.com
  output:
    format: csv
    csvSeparator: ","
    noHeaders: false
    noUnits: false
    file: "/tmp/output.csv"
  period:
    insecure: true
    duration: 1d
    precision: 4

Kustomize examples

see kustomize examples

SxcollectorConfig CRD

Spec

property Default Description
configType mandatory define the type of this sxcollector configuration. This field is mandatory. Should be generic, confluence, gsheet, mail, output, period, all
generic {} define the generic configurations parameters. Should be used with type generic or all
output {} define the output configurations parameters. Should be used with type output or all
period {} define the period configurations parameters. Should be used with type period or all
mail {} define the mail configurations parameters. Should be used with type mail or all
confluence {} define the confluence configurations parameters. Should be used with type confluence or all
gsheet {} define the gsheet configurations parameters. Should be used with type gsheet or all

Spec.generic

property Default Description
insecure false Skip TLS verification for prometheus communication (default false)
debug false Activates debug mode for detailed troubleshooting information

Spec.output

property Default Description
format tab formating of the generated content. Could be tab, json or csv
csvSeparator , Define the separator sign to use for the csv format; Default is ‘,’
noHeaders false Disable headers in the result. Default is false
noUnits false Disable unit header in the result. Default is false
file stdout Define the output file. If not set, stdout will be used

Spec.period

property Default Description
insecure false Skip TLS verification for prometheus communication (default false)
duration 1h Define the period duration. ex: 1y. Could be overwrite by –to (default is 1h)
precision 1 A factor that divide the duration. Used for slicing prometheus data (default is 1 = all)

Spec.mail

property Default Description
from none Define the source mail. If set, output will be of type mail
smtpHost 127.0.0.1 Define the SMTP host
smtpPort 25 Define the SMTP port
smtpUsername user Define the SMTP username
SmtpPassword pwd Define the SMTP password
SmtpInsecure false Define if SMTP connection is insecure

Spec.gsheet

property Default Description
spreadsheetId none he spreadsheetID to use. If set pass to an update mode
spreadsheetTitle none The spreadsheet name to use in case of creation
sheetTitle none The sheet name to use within the spreadsheet
credsFilename user The name of the google credentials file. If unset, use default name: credentials.json.
credsPath pwd The name of the path to google credentials. If unset, use default path: /tmp
CredsDomain google.com The company domain to use. If unset, use default path: google.com. Only used if permision are required at the domain level

Spec.confluence

property Default Description
url none The confluence base URL ex: https://example.atlassian.net/wiki
username none The confluence username ex: user@example.com
token none The confluence API Token, see https://id.atlassian.com/manage-profile/security/api-tokens
spaceKey none The confluence Space key
title none The confluence page title (or section if mode=append)
content none The confluence page content (prepended to the generated content)
pageId none The confluence pageID (required except for –confluence-mode=create)
parentId none The confluence parentID (useful with –confluence-mode=create)

Status

property Default Description
secretName none SecretName is the name of the Kubernetes Secret that stores sensitive information
errorMessage none ErrorMessage is the error message for the last error