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 / main.py
Created February 18, 2025 19:14
skaffold-issues-server/backend/main.py
import logging
import glob
import os
import textwrap
import re
import numpy as np
import pandas as pd
from flask import Flask, request, jsonify
from flask_cors import CORS
from vertexai.preview.language_models import TextEmbeddingModel, TextGenerationModel, CodeGenerationModel
@aaron-prindle
aaron-prindle / gist:bf06660a18587651427c7bb68ba01cc2
Created February 5, 2025 19:52
ReplicationController.Replicas invalid.yaml file re-prompted for no `detail` field
# Base valid ReplicationController object (must be the SAME as in valid.yaml)
apiVersion: v1
kind: ReplicationController
metadata:
name: valid-rc
spec:
replicas: 1
selector:
app: my-app
template:
@aaron-prindle
aaron-prindle / gist:c1909649867068495dc07033cd1ba6d5
Created February 5, 2025 19:47
ReplicationController.Replicas invalid.yaml
# Base valid ReplicationController object (must be the SAME as in valid.yaml)
apiVersion: v1
kind: ReplicationController
metadata:
name: valid-rc
spec:
replicas: 1
selector:
app: my-app
template:
@aaron-prindle
aaron-prindle / gist:305ddd14a0bc9304061457d6f2e88b3b
Last active February 6, 2025 01:40
valid.yaml for ReplicationController.Replicas
# Base valid ReplicationController object
apiVersion: v1
kind: ReplicationController
metadata:
name: valid-rc
spec:
replicas: 1 # Valid: default value
selector:
app: my-app
template:
/*
Copyright 2024 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
@aaron-prindle
aaron-prindle / validation_test.go
Created January 18, 2025 22:27
Declarative Validation: Example of migration changes for pkg/apis/core/validation/validation_test.go
diff --git a/pkg/apis/core/validation/validation_test.go b/pkg/apis/core/validation/validation_test.go
index 295f8425eab..8a9fdb68661 100644
--- a/pkg/apis/core/validation/validation_test.go
+++ b/pkg/apis/core/validation/validation_test.go
@@ -1,27 +1,32 @@
/*
-Copyright 2014 The Kubernetes Authors.
+ Copyright 2014 The Kubernetes Authors.
-Licensed under the Apache License, Version 2.0 (the "License");
@aaron-prindle
aaron-prindle / zz_generated.validations.go
Created January 14, 2025 05:40
Declarative Validation Example For ReplicationController
//go:build !ignore_autogenerated
// +build !ignore_autogenerated
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
@aaron-prindle
aaron-prindle / gist:d26e1e8075cf4eb69eb7c31f0f5c8ab6
Created October 15, 2024 18:17
testserver-HEAD-w-1.31-emulation-10-12-2024.txt
# HELP kubernetes_feature_enabled [BETA] This metric records the data about the stage and enablement of a k8s feature.
# TYPE kubernetes_feature_enabled gauge
kubernetes_feature_enabled{name="APIListChunking",stage=""} 1
kubernetes_feature_enabled{name="APIResponseCompression",stage="BETA"} 1
kubernetes_feature_enabled{name="APIServerIdentity",stage="BETA"} 1
kubernetes_feature_enabled{name="APIServerTracing",stage="BETA"} 1
kubernetes_feature_enabled{name="APIServingWithRoutine",stage="ALPHA"} 0
kubernetes_feature_enabled{name="AdmissionWebhookMatchConditions",stage=""} 1
kubernetes_feature_enabled{name="AggregatedDiscoveryEndpoint",stage=""} 1
kubernetes_feature_enabled{name="AllAlpha",stage="ALPHA"} 0
# HELP kubernetes_feature_enabled [BETA] This metric records the data about the stage and enablement of a k8s feature.
# TYPE kubernetes_feature_enabled gauge
kubernetes_feature_enabled{name="APIListChunking",stage=""} 1
kubernetes_feature_enabled{name="APIResponseCompression",stage="BETA"} 1
kubernetes_feature_enabled{name="APIServerIdentity",stage="BETA"} 1
kubernetes_feature_enabled{name="APIServerTracing",stage="BETA"} 1
kubernetes_feature_enabled{name="APIServingWithRoutine",stage="ALPHA"} 0
kubernetes_feature_enabled{name="AdmissionWebhookMatchConditions",stage=""} 1
kubernetes_feature_enabled{name="AggregatedDiscoveryEndpoint",stage=""} 1
kubernetes_feature_enabled{name="AllAlpha",stage="ALPHA"} 0
@aaron-prindle
aaron-prindle / gist:3124f38817db18381336dc0fe0fcd879
Created October 13, 2024 22:36
HEAD-w-1.31-emulation-10-12-2024.txt
# HELP kubernetes_feature_enabled [BETA] This metric records the data about the stage and enablement of a k8s feature.
# TYPE kubernetes_feature_enabled gauge
kubernetes_feature_enabled{name="APIListChunking",stage=""} 1
kubernetes_feature_enabled{name="APIResponseCompression",stage="BETA"} 1
kubernetes_feature_enabled{name="APIServerIdentity",stage="BETA"} 1
kubernetes_feature_enabled{name="APIServerTracing",stage="BETA"} 1
kubernetes_feature_enabled{name="APIServingWithRoutine",stage="ALPHA"} 0
kubernetes_feature_enabled{name="AdmissionWebhookMatchConditions",stage=""} 1
kubernetes_feature_enabled{name="AggregatedDiscoveryEndpoint",stage=""} 1
kubernetes_feature_enabled{name="AllAlpha",stage="ALPHA"} 0