This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
from subprocess import call, check_output, CalledProcessError | |
import subprocess | |
import fnmatch | |
import os | |
from datetime import datetime | |
logfile = "changes_" + datetime.now().strftime("%Y%m%d-%H%M%S") + ".log" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
import os | |
def projects_list(): | |
projList = [] | |
data = json.loads(os.popen('gcloud projects list --format json').read()) | |
for item in data: | |
if item['lifecycleState'] == "ACTIVE": | |
projList.append(item['projectId']) | |
return projList |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Lists all the images currently in use in all clusters configured in your .kube/config | |
""" | |
from kubernetes import client, config | |
def main(): | |
all_images = [] | |
contexts, active_context = config.list_kube_config_contexts() | |
if not contexts: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import google.auth | |
from google.auth.transport.requests import AuthorizedSession | |
### Global vars | |
REGISTRY_BASE = 'https://us.gcr.io/v2' | |
### | |
try: | |
credentials, project = google.auth.default(scopes=['https://www.googleapis.com/auth/cloud-platform']) | |
authed_session = AuthorizedSession(credentials) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"processors": [ | |
{ | |
"remove": { | |
"field": [ | |
"agent.ephemeral_id", | |
"agent.hostname", | |
"agent.id", | |
"agent.type", | |
"agent.version", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
locals { | |
eks_oidc_issuer_url = "https://${module.eks_blueprints.eks_oidc_issuer_url}" | |
name = "external-dns" | |
} | |
data "tls_certificate" "eks_cluster" { | |
url = local.eks_oidc_issuer_url | |
} | |
resource "aws_iam_openid_connect_provider" "eks_provider" { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
provider "cloudflare" { | |
api_token = var.cf_api_token | |
} | |
variable "cf_api_token" {} | |
variable "account_id" {} | |
resource "random_id" "tunnel_secret" { | |
byte_length = 35 | |
} |
OlderNewer