Skip to content

Instantly share code, notes, and snippets.

View aaron-prindle's full-sized avatar
💭
📦

Aaron Prindle aaron-prindle

💭
📦
  • Google
  • San Francisco
View GitHub Profile
kubernetes/website vs versioned_kube_features.go (& kube_features.go) Deltas and General Inaccuracies [final]
kubernetes/website Inaccuracies
Note: below kubernetes/website JSON is a custom struct and differs from the website syntax BUT the values/info is identical
TBD - Add AppArmorFields feature? (missing on kubernetes/website)
TBD - Add DisableAllocatorDualWrite feature (missing on kubernetes/website)
TBD - Add ReloadKubeletServerCertificateFile feature (missing on kubernetes/website)
Add missing GA entry for DisableCloudProviders
package main
import (
"context"
"fmt"
v1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1"
"k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/fake"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)
@aaron-prindle
aaron-prindle / gist:278bf93cff25839155befec7781e46e4
Created August 22, 2024 23:07
git patch to get hack/local-up-cluster.sh working
diff --git a/cluster/addons/dns/coredns/coredns.yaml.base b/cluster/addons/dns/coredns/coredns.yaml.base
index 3d438dce445..068c4f59e46 100644
--- a/cluster/addons/dns/coredns/coredns.yaml.base
+++ b/cluster/addons/dns/coredns/coredns.yaml.base
@@ -74,7 +74,7 @@ data:
ttl 30
}
prometheus :9153
- forward . /etc/resolv.conf {
+ forward . 8.8.8.8 8.8.4.4 {
{
"credHelpers": {
"asia.gcr.io": "gcloud",
"eu.gcr.io": "gcloud",
"gcr.io": "gcloud",
"marketplace.gcr.io": "gcloud",
"staging-k8s.gcr.io": "gcloud",
"us-central1-docker.pkg.dev": "gcloud",
"us-west2-docker.pkg.dev": "gcloud",
"us-west4-docker.pkg.dev": "gcloud",
@aaron-prindle
aaron-prindle / gist:c1e0d94314effa5cb6a796ea5a75d677
Created February 13, 2024 03:07
Pyhon script to get all contributors for GoogleContainerTools/kaniko repository
import requests
def get_all_contributors(owner, repo):
contributors = []
per_page = 100 # Max value allowed by GitHub API
page = 1
while True:
url = f"https://api.github.com/repos/{owner}/{repo}/contributors"
params = {'per_page': per_page, 'page': page}
headers = {'Accept': 'application/vnd.github.v3+json'}
apiVersion: v1
kind: Pod
metadata:
name: kaniko-root-go-ethereum-v2
namespace: wi
labels:
kaniko-test-category: root
spec:
serviceAccountName: <SA>
nodeSelector:
diff --git a/pkg/commands/copy_test.go b/pkg/commands/copy_test.go
index 3eba9c6b..795ca577 100755
--- a/pkg/commands/copy_test.go
+++ b/pkg/commands/copy_test.go
@@ -465,6 +465,12 @@ func TestCopyCommand_ExecuteCommand_Extended(t *testing.T) {
t.Run("copy dir to another dir - with ignored files", func(t *testing.T) {
testDir, srcDir := setupDirs(t)
defer os.RemoveAll(testDir)
+ util.Lstat = func(name string) (fs.FileInfo, error) {
+ fi, err := os.Lstat(name)
diff --git a/pkg/commands/copy_test.go b/pkg/commands/copy_test.go
index 3eba9c6b..795ca577 100755
--- a/pkg/commands/copy_test.go
+++ b/pkg/commands/copy_test.go
@@ -465,6 +465,12 @@ func TestCopyCommand_ExecuteCommand_Extended(t *testing.T) {
t.Run("copy dir to another dir - with ignored files", func(t *testing.T) {
testDir, srcDir := setupDirs(t)
defer os.RemoveAll(testDir)
+ util.Lstat = func(name string) (fs.FileInfo, error) {
+ fi, err := os.Lstat(name)
diff --git a/pkg/commands/copy_test.go b/pkg/commands/copy_test.go
index 3eba9c6b..795ca577 100755
--- a/pkg/commands/copy_test.go
+++ b/pkg/commands/copy_test.go
@@ -465,6 +465,12 @@ func TestCopyCommand_ExecuteCommand_Extended(t *testing.T) {
t.Run("copy dir to another dir - with ignored files", func(t *testing.T) {
testDir, srcDir := setupDirs(t)
defer os.RemoveAll(testDir)
+ util.Lstat = func(name string) (fs.FileInfo, error) {
+ fi, err := os.Lstat(name)
@aaron-prindle
aaron-prindle / gist:336b8922a8468a230ed682c7e523bb3b
Created July 7, 2023 21:11
kubectl logs kaniko-root-grafana -n workload-identity
Defaulted container "kaniko" out of: kaniko, prepare (init)
INFO[0000] Resolved base name tonistiigi/xx:1.2.1 to xx
INFO[0000] Resolved base name busybox to build-dummy
INFO[0000] Resolved base name scratch to binary-dummy
INFO[0000] Resolved base name golang:1.20.5-bullseye to base
INFO[0000] Resolved base name base to criu
INFO[0000] Resolved base name base to registry-src
INFO[0000] Resolved base name base to registry
INFO[0000] Resolved base name base to swagger-src
INFO[0000] Resolved base name base to swagger