Skip to content

Instantly share code, notes, and snippets.

@SergK
SergK / run.sh
Created December 18, 2023 12:48
Clean Dependency track projects
#!/bin/bash
set -ex
API_KEY="YOUR_KEY"
DT_URL="https://example.com"
# Execute the GET request and save the response to a variable
response=$(curl -X GET "${DT_URL}/api/v1/search/project?query=test*" -H "X-Api-Key: ${API_KEY}")
@SergK
SergK / medium_openshift_reportportal_route.yaml
Created November 4, 2022 18:15
ReportPortal OpenShift Routing
---
kind: ConfigMap
metadata:
name: gateway-config
namespace: report-portal
apiVersion: v1
data:
traefik-dynamic-config.yml: |
http:
middlewares:
@SergK
SergK / medium_reportportal_scc.yaml
Created November 4, 2022 16:16
ReportPortal OpenShift SCC
apiVersion: security.openshift.io/v1
kind: SecurityContextConstraints
metadata:
annotations:
"helm.sh/hook": "pre-install"
name: report-portal
allowHostDirVolumePlugin: false
allowHostIPC: false
allowHostNetwork: false
allowHostPID: false
@SergK
SergK / medium_reportportal_deps_elastic.yaml
Last active November 4, 2022 14:06
SecurityContextConstraints for ElasticSearch running as a part of ReportPortal
apiVersion: security.openshift.io/v1
kind: SecurityContextConstraints
metadata:
annotations:
"helm.sh/hook": "pre-install"
name: report-portal-elasticsearch
allowHostDirVolumePlugin: false
allowHostIPC: false
allowHostNetwork: false
allowHostPID: false
@SergK
SergK / medium_reportportal_deps.yaml
Last active November 4, 2022 14:05
SecurityContextConstraints for Minio, RabbitMQ, Postgresql running as a part of ReportPortal
apiVersion: security.openshift.io/v1
kind: SecurityContextConstraints
metadata:
annotations:
"helm.sh/hook": "pre-install"
name: report-portal-minio-rabbitmq-postgresql
allowHostDirVolumePlugin: false
allowHostIPC: false
allowHostNetwork: false
allowHostPID: false
@SergK
SergK / medium_fluentbit_logsight
Created October 24, 2022 12:54
FluentBit configuration for Logsight running with EDP Platform
[INPUT]
Name tail
Tag kube.sit.*
Path /var/log/containers/*edp-sit*.log
Parser docker
Mem_Buf_Limit 5MB
Skip_Long_Lines Off
Refresh_Interval 10
[FILTER]
@SergK
SergK / main.py
Last active May 18, 2022 15:39
logsight.ai
import copy
import time
from datetime import datetime
import argparse
import logsight.exceptions
from logsight.user import LogsightUser
from logsight.logs import LogsightLogs
from logsight.compare import LogsightCompare
[options]
#
# WARNING:
# If you use the Odoo Database utility to change the master password be aware
# that the formatting of this file WILL be LOST! A copy of this file named
# /etc/odoo/openerp-server.conf.template has been made in case this happens
# Note that the copy does not have any first boot changes
#-----------------------------------------------------------------------------
# Odoo Server Config File - TurnKey Linux
/* Copyright 2021 EPAM Systems.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.