Unverified Commit 76302877 authored by Kevin Di Lallo's avatar Kevin Di Lallo Committed by GitHub
Browse files

Merge pull request #267 from dilallkx/kd_sp25_influx

InfluxDB Backup & Retention
parents e51fa223 ffecda1f
Loading
Loading
Loading
Loading
+11 −1
Original line number Diff line number Diff line
@@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

version: 1.7.2
version: 1.7.3
repo:
  name: AdvantEDGE

@@ -93,6 +93,16 @@ repo:

    # Metrics Configuration
    metrics:
      # Influx configuration
      influx:
        # enable influx data backups
        enabled: false
        # object store url
        url: my-object-store-fqdn
        # object store configuration secret
        secret: meep-influx-objstore-config
        # Number of days to retain daily data backups
        retention: 7
      # Prometheus configuration
      prometheus:
        # external labels added to prometheus metrics
+2 −0
Original line number Diff line number Diff line
@@ -10,6 +10,8 @@ metadata:
    {{- toYaml .Values.backup.annotations | nindent 4 }}
spec:
  schedule: {{ .Values.backup.schedule | quote }}
  successfulJobsHistoryLimit: 0
  failedJobsHistoryLimit: 0
  startingDeadlineSeconds: {{ .Values.backup.startingDeadlineSeconds }}
  concurrencyPolicy: Forbid
  jobTemplate:
+2 −0
Original line number Diff line number Diff line
@@ -10,6 +10,8 @@ metadata:
    {{- toYaml .Values.backupRetention.annotations | nindent 4 }}
spec:
  schedule: {{ .Values.backupRetention.schedule | quote }}
  successfulJobsHistoryLimit: 0
  failedJobsHistoryLimit: 0
  startingDeadlineSeconds: {{ .Values.backupRetention.startingDeadlineSeconds }}
  concurrencyPolicy: Forbid
  jobTemplate:
+10 −10
Original line number Diff line number Diff line
@@ -441,11 +441,11 @@ backup:
  ## Please look at https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-files.html#cli-configure-files-where
  ## for the credentials format.
  ## The bucket should already exist.
  # s3:
  #   credentialsSecret: aws-credentials-secret
  #   destination: s3://bucket/path
  #   ## Optional. Specify if you're using an alternate S3 endpoint.
  #   # endpointUrl: ""
  s3:
    credentialsSecret: meep-influx-objstore-config
    destination: s3://influx
    ## Optional. Specify if you're using an alternate S3 endpoint.
    endpointUrl: ""

backupRetention:
  enabled: false
@@ -461,8 +461,8 @@ backupRetention:
  annotations: {}
  podAnnotations: {}
  daysToRetain: 7
  # s3:
  #   credentialsSecret: aws-credentials-secret
  #   bucketName: bucket
  #   ## Optional. Specify if you're using an alternate S3 endpoint.
  #   # endpointUrl: ""
  s3:
    credentialsSecret: meep-influx-objstore-config
    bucketName: influx
    ## Optional. Specify if you're using an alternate S3 endpoint.
    endpointUrl: ""
+4 −2
Original line number Diff line number Diff line
@@ -11,14 +11,16 @@ echo ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>"
echo ""
kubectl delete secret meep-thanos-objstore-config
kubectl delete secret meep-thanos-archive-objstore-config
kubectl delete secret meep-influx-objstore-config

echo ""
echo ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>"
echo ">> Configuring Object Store secrets"
echo ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>"
echo ""
kubectl create secret generic meep-thanos-objstore-config --from-file=objstore.yml=$BASEDIR/thanos.yaml
kubectl create secret generic meep-thanos-archive-objstore-config --from-file=objstore.yml=$BASEDIR/thanos-archive.yaml
kubectl create secret generic meep-thanos-objstore-config --from-file=objstore.yml=$BASEDIR/objstore-thanos.yaml
kubectl create secret generic meep-thanos-archive-objstore-config --from-file=objstore.yml=$BASEDIR/objstore-thanos-archive.yaml
kubectl create secret generic meep-influx-objstore-config --from-file=credentials=$BASEDIR/objstore-influx.cfg

echo ""
echo ">>> Object Store configuration completed"
Loading