Skip to content

Instantly share code, notes, and snippets.

View upodroid's full-sized avatar
🤔
Focusing

Mahamed Ali upodroid

🤔
Focusing
  • Earth
View GitHub Profile
@upodroid
upodroid / execution.log
Created February 24, 2023 15:37
Sig Node E2E decoupling.
maha4472@knative-e2e:~/kubernetes$ cat ~/.ssh/config
# SSH over AWS Systems Manager Session Manager
host i-* mi-*
ProxyCommand sh -c "aws ssm start-session --target %h --document-name AWS-StartSSHSession --parameters 'portNumber=%p'"
User ubuntu
maha4472@knative-e2e:~/kubernetes$ CGO_ENABLED=0 make test-e2e-node REMOTE=true REMOTE_MODE=ssh HOSTS="i-02122ff7e9fd7ce37" SKIP="" PARALLELISM=1 FOCUS="Eviction" SSH_KEY=~/.ssh/google_compute_engine SSH_USER=ubuntu
go version go1.20.1 linux/amd64
+++ [0224 15:30:11] Building go targets for linux/amd64
github.com/onsi/ginkgo/v2/ginkgo (non-static)
go version go1.20.1 linux/amd64
==> Checking source code against gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 TF_SCHEMA_PANIC_ON_ERROR=1 go test ./google-beta -v -run=TestAccContainerNodePool_maxPodsPerNode -timeout 240m -ldflags="-X=github.com/hashicorp/terraform-provider-google-beta/version.ProviderVersion=acc"
=== RUN TestAccContainerNodePool_maxPodsPerNode
=== PAUSE TestAccContainerNodePool_maxPodsPerNode
=== CONT TestAccContainerNodePool_maxPodsPerNode
2021/06/11 14:18:22 [INFO] Authenticating using DefaultClient...
2021/06/11 14:18:22 [INFO] -- Scopes: [https://www.googleapis.com/auth/compute https://www.googleapis.com/auth/cloud-platform https://www.googleapis.com/auth/cloud-identity https://www.googleapis.com/auth/ndev.clouddns.readwrite https://www.googleapis.com/auth/devstorage.full_control https://www.googleapis.com/auth/userinfo.email]
2021/06/11 14:18:22 [INFO] Authenticating using DefaultClient...
2021/06/11 14:18:22 [INFO] -- Scopes: [https://www.googleapis.com/auth/compute https://www.g
@upodroid
upodroid / sg-check.py
Last active May 7, 2021 15:32
AWS Security Group Cleanup
import boto3
import os
def getLambdaSgs():
lambdaclient = boto3.client('lambda', region_name=os.getenv("AWS_REGION"))
marker = None
lambdasgs = []
while True:
if marker:
@upodroid
upodroid / debug.log
Created February 24, 2021 18:19
GCS No-current object deletion
==> Checking source code against gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 TF_SCHEMA_PANIC_ON_ERROR=1 go test ./google-beta -v -run TestAccStorageBucket_forceDestroyWithVersioning -timeout 240m -ldflags="-X=github.com/hashicorp/terraform-provider-google-beta/v3/version.ProviderVersion=acc"
=== RUN TestAccStorageBucket_forceDestroyWithVersioning
=== PAUSE TestAccStorageBucket_forceDestroyWithVersioning
=== CONT TestAccStorageBucket_forceDestroyWithVersioning
2021/02/24 18:10:16 [INFO] Authenticating using DefaultClient...
2021/02/24 18:10:16 [INFO] -- Scopes: [https://www.googleapis.com/auth/compute https://www.googleapis.com/auth/cloud-platform https://www.googleapis.com/auth/cloud-identity https://www.googleapis.com/auth/ndev.clouddns.readwrite https://www.googleapis.com/auth/devstorage.full_control https://www.googleapis.com/auth/userinfo.email]
2021/02/24 18:10:22 [INFO] Authenticating using DefaultClient...
2021/02/24 18:10:22 [INFO] -- Scopes: [https://www.google
@upodroid
upodroid / image.log
Created August 17, 2020 10:27
Machine Image Errors
REDACTED  MCW0CDP3YY  ~  go  …  github.com  hashicorp  terraform-provider-google-beta   master  26⬇  10✎  6+  $  make testacc TEST=./google-beta TESTARGS='-run=TestAccComputeInstanceFromMachineImage'
==> Checking source code against gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 TF_SCHEMA_PANIC_ON_ERROR=1 go test ./google-beta -v -run=TestAccComputeInstanceFromMachineImage -timeout 240m -ldflags="-X=github.com/hashicorp/terraform-provider-google-beta/version.ProviderVersion=acc"
=== RUN TestAccComputeInstanceFromMachineImage_basic
=== PAUSE TestAccComputeInstanceFromMachineImage_basic
=== RUN TestAccComputeInstanceFromMachineImage_overrideBootDisk
=== PAUSE TestAccComputeInstanceFromMachineImage_overrideBootDisk
=== RUN TestAccComputeInstanceFromMachineImage_overrideAttachedDisk
=== PAUSE TestAccComputeInstanceFromMachineImage_overrideAttachedDisk
@upodroid
upodroid / adc.py
Last active April 10, 2021 00:52
Google Service Account Impersonation
import googleapiclient.errors
import requests
from google.oauth2.credentials import Credentials
from googleapiclient.discovery import build
def GetCredentials(client_id, client_secret, refresh_token):
"""Convert ADC to access_token/Credential"""
params = {
"grant_type": "refresh_token",
"client_id": client_id,
@upodroid
upodroid / Linux.md
Created November 7, 2019 22:50
Toolbox

Useful programs on linux

  • fzf
  • kubens
  • kubectx
  • tfenv
  • nvm

Standard tools like

  • kubectl
@upodroid
upodroid / list.md
Created September 23, 2019 11:02
Kubernetes Todo

Kubernetes Todo

Applications

Ingresses

  • nginx
  • Kong
  • Traefik

Monitoring

@upodroid
upodroid / ansible.log
Last active April 19, 2019 19:03
Ansible broken
upo@helper-instance:~/ops-infra/packer$ packer build ansible.json
googlecompute output will be in this color.
==> googlecompute: Checking image does not exist...
==> googlecompute: Creating temporary SSH key for instance...
==> googlecompute: Using image: ubuntu-1804-bionic-v20190404
==> googlecompute: Creating instance...
googlecompute: Loading zone: europe-west2-b
googlecompute: Loading machine type: n1-standard-1
googlecompute: Requesting instance creation...
@upodroid
upodroid / snippets.md
Last active February 12, 2020 12:28
Useful gcloud snippets

Useful snippets

gcloud / kubernetes

$(gcloud info --format='value(config.project)') Quick way to get project vars

logs in cli gcloud logging read "SOME FILTER" --project SOME-PROJECT --format json | jq 'reverse[] | .textPayload ' --raw-output -j

Give yourself cluster admin role