Skip to content

Instantly share code, notes, and snippets.

View pgvishnuram's full-sized avatar
🏠
Working from home

pgvishnuram

🏠
Working from home
View GitHub Profile
global:
baseDomain: <value to be filled>
tlsSecret: astronomer-tls
postgresqlEnabled: true
fluentdEnabled: true
# custom logging
custom_logging:
enabled: true
scheme: https
#!/bin/bash
for images in $(make show-docker-images | awk '{print $2}') ; do trivy image --ignorefile trivyignore --ignore-unfixed -f table -s CRITICAL,HIGH $images | grep -Ev 'INFO|WARN'; done > out.txt
#!/bin/bash
if [ $# -lt 1 ]
then
echo "Usage: $0 pass releaseprefix ex: astronomer or astronomer-"
exit 1
fi
releaseprefix=$1
def create_ecr(repo_name):
try:
client = boto3.client("ecr")
response = client.create_repository(repositoryName=repo_name)
except client.exceptions.from_code("RepositoryAlreadyExistsException"):
print(f"ECR Registry {repo_name} Already exists")
#!/bin/bash
alerts='[
{
"labels": {
"alertname": "sample_003",
"severity": "critical",
"tier": "airflow",
"release": "test121"
},
"annotations": {
#!/bin/bash
AWS_REGION=$1
if [ $# -lt 1 ]
then
echo "Usage: $0 pass aws-region as args"
exit 1
fi
aws ec2 describe-vpcs --region $AWS_REGION| jq '.Vpcs | length'
#!/bin/bash
for deployments in $(astro deployment list | grep -Ev 'ASTRO' | awk '{print $4}'); do
echo "Deleting deployment ID: $deployments" ; yes | astro deployment delete $deployments --hard ;
done
---
# Source: astronomer/charts/nginx/templates/nginx-config-role.yaml
################################
## NGINX Config Role
#################################
kind: Role
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: astronomer-nginx-config
labels:
from gql import gql, Client
from gql.transport.aiohttp import AIOHTTPTransport
token = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
api_url = "xxxxxxxxxx"
transport = AIOHTTPTransport(url=api_url,headers={'Authorization': token })
client = Client(transport=transport, fetch_schema_from_transport=True)
sending all events
{
id: 'e575682b-7dc7-4e2b-8b79-857a7f316d3c',
timestamp: '2023-02-09T14:47:51.99137Z',
action: 'push',
target: {
mediaType: 'application/vnd.oci.image.manifest.v1+json',
size: 481,
digest: 'sha256:7fb7f34889c1886d77235fa9351bdd10450b93e5b9eec63ba8a2b0a6dfe18591',
length: 481,