Skip to content

Instantly share code, notes, and snippets.

View ncdc's full-sized avatar

Andy Goldstein ncdc

View GitHub Profile
diff --git a/controlplane/kubeadm/api/v1alpha3/zz_generated.conversion.go b/controlplane/kubeadm/api/v1alpha3/zz_generated.conversion.go
index 41ccef8c4..fa157f97a 100644
--- a/controlplane/kubeadm/api/v1alpha3/zz_generated.conversion.go
+++ b/controlplane/kubeadm/api/v1alpha3/zz_generated.conversion.go
@@ -1,4 +1,4 @@
-// +build !ignore_autogenerated
+// +build !andy_kcp
/*
Copyright The Kubernetes Authors.
@ncdc
ncdc / foo.diff
Last active September 24, 2020 20:29
diff --git a/controllers/machinehealthcheck_targets.go b/controllers/machinehealthcheck_targets.go
index 6f03ed863..2a6de43e3 100644
--- a/controllers/machinehealthcheck_targets.go
+++ b/controllers/machinehealthcheck_targets.go
@@ -58,6 +58,7 @@ const (
// healthCheckTarget contains the information required to perform a health check
// on the node to determine if any remediation is required.
type healthCheckTarget struct {
+ Cluster *clusterv1.Cluster
Machine *clusterv1.Machine
@ncdc
ncdc / foo.diff
Created September 11, 2020 15:25
diff --git a/util/patch/patch.go b/util/patch/patch.go
index e0c2b65b2..78c42ebb2 100644
--- a/util/patch/patch.go
+++ b/util/patch/patch.go
@@ -37,8 +37,8 @@ import (
type Helper struct {
client client.Client
beforeObject runtime.Object
- before *unstructured.Unstructured
- after *unstructured.Unstructured
@ncdc
ncdc / gist:863c7b00abfa305574713e08f66bcd80
Created July 23, 2020 17:56
Packer stuck trying to connect to Photon VM after reboot
vmware-iso: TASK [setup : Reboot after distro sync] ****************************************
2020/07/23 13:52:26 packer-provisioner-ansible plugin: SSH proxy: accepted connection
2020/07/23 13:52:26 packer-provisioner-ansible plugin: authentication attempt from 127.0.0.1:51529 to 127.0.0.1:51337 as goldsteina using none
2020/07/23 13:52:26 packer-provisioner-ansible plugin: authentication attempt from 127.0.0.1:51529 to 127.0.0.1:51337 as goldsteina using publickey
2020/07/23 13:52:26 packer-provisioner-ansible plugin: authentication attempt from 127.0.0.1:51529 to 127.0.0.1:51337 as goldsteina using publickey
2020/07/23 13:52:26 packer-provisioner-ansible plugin: rejecting auth-agent-req@openssh.com request
2020/07/23 13:52:26 packer-provisioner-ansible plugin: new env request: LANG=en_US.UTF-8
2020/07/23 13:52:26 packer-provisioner-ansible plugin: new env request: LC_TERMINAL=iTerm2
2020/07/23 13:52:26 packer-provisioner-ansible plugin: new env request: LC_TERMINAL_VERSION=3.3.12
2020/07/23 13:52:26 pac
/*
Copyright 2020 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
@ncdc
ncdc / cluster.yaml
Created May 9, 2019 19:35
Cluster API 9 May 2019 webinar example yaml files
apiVersion: "cluster.k8s.io/v1alpha1"
kind: Cluster
metadata:
name: demo1
spec:
clusterNetwork:
services:
cidrBlocks: ["10.96.0.0/12"]
pods:
cidrBlocks: ["192.168.0.0/16"]
@ncdc
ncdc / test1.yaml
Created January 31, 2020 21:43
cluster api v1alpha3 capa test
apiVersion: cluster.x-k8s.io/v1alpha3
kind: Cluster
metadata:
name: test1
spec:
clusterNetwork:
pods:
cidrBlocks: ["192.168.0.0/16"]
infrastructureRef:
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha3
diff --git a/config/webhook/kustomization.yaml b/config/webhook/kustomization.yaml
index 9cf2613..1dcdbda 100644
--- a/config/webhook/kustomization.yaml
+++ b/config/webhook/kustomization.yaml
@@ -4,3 +4,6 @@ resources:
configurations:
- kustomizeconfig.yaml
+
+patchesStrategicMerge:
diff --git a/controlplane/kubeadm/controllers/kubeadm_control_plane_controller.go b/controlplane/kubeadm/controllers/kubeadm_control_plane_controller.go
index 8961c49e9..186eb87b7 100644
--- a/controlplane/kubeadm/controllers/kubeadm_control_plane_controller.go
+++ b/controlplane/kubeadm/controllers/kubeadm_control_plane_controller.go
@@ -29,6 +29,7 @@ import (
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
"k8s.io/apimachinery/pkg/types"
utilerrors "k8s.io/apimachinery/pkg/util/errors"
+ "k8s.io/apiserver/pkg/storage/names"
"k8s.io/client-go/tools/record"
diff --git a/pkg/envtest/crd.go b/pkg/envtest/crd.go
index 39b24452..2fd1e4e3 100644
--- a/pkg/envtest/crd.go
+++ b/pkg/envtest/crd.go
@@ -25,7 +25,7 @@ import (
"path/filepath"
"time"
- apiextensionsv1beta1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1"
+ apiextensionsv1beta1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1"