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
@aaron-prindle
aaron-prindle / gist:3e8a5c3cef3b8ff10763be0d4858254d
Created September 9, 2024 19:13
K8s types that have APILifecycleRemoved OR APILifecycleDeprecated targeting v1.32
File: ./staging/src/k8s.io/api/authentication/v1alpha1/zz_generated.prerelease-lifecycle.go
}
// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison.
// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor.
func (in *SelfSubjectReview) APILifecycleRemoved() (major, minor int) {
return 1, 32
-----------------------------------------
File: ./staging/src/k8s.io/api/apidiscovery/v2beta1/zz_generated.prerelease-lifecycle.go
}
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)