Skip to content

Instantly share code, notes, and snippets.

View clustersync.log
time="2021-04-06T15:38:24.042Z" level=info msg="reconciling ClusterDeployment" clusterDeployment=default/abutcher controller=clustersync reconcileID=dm7tqk2s
time="2021-04-06T15:38:24.043Z" level=debug msg="Getting statefulset" clusterDeployment=default/abutcher controller=clustersync reconcileID=dm7tqk2s
time="2021-04-06T15:38:24.043Z" level=debug msg="Ensuring replicas is set" clusterDeployment=default/abutcher controller=clustersync reconcileID=dm7tqk2s
time="2021-04-06T15:38:24.043Z" level=debug msg="Getting uid for hashing" clusterDeployment=default/abutcher controller=clustersync reconcileID=dm7tqk2s
time="2021-04-06T15:38:24.043Z" level=debug msg="hexUID: 56db3ef7f5464778a0f642d5dd4ab79d" clusterDeployment=default/abutcher controller=clustersync reconcileID=dm7tqk2s
time="2021-04-06T15:38:24.043Z" level=debug msg="calculating replicas" clusterDeployment=default/abutcher controller=clustersync reconcileID=dm7tqk2s
time="2021-04-06T15:38:24.043Z" level=debug msg="determining who is assigned to sync this
View gist:955c0bfb9d0617a81daf1e05bb416337
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
annotations:
kubectl.kubernetes.io/last-applied-configuration: |
{"apiVersion":"rbac.authorization.k8s.io/v1","kind":"ClusterRole","metadata":{"annotations":{},"name":"hive-admin","ownerReferences":[{"apiVersion":"hive.openshift.io/v1","blockOwnerDeletion":true,"kind":"HiveConfig","name":"hive","uid":"026966f0-4da1-428a-a96c-5bc1da082e7d"}]},"rules":[{"apiGroups":["batch"],"resources":["jobs"],"verbs":["get","list","watch"]},{"apiGroups":[""],"resources":["pods","pods/log"],"verbs":["get","list","watch"]},{"apiGroups":["hive.openshift.io"],"resources":["clusterdeployments","clusterprovisions","dnszones","machinepools","machinepoolnameleases","selectorsyncidentityproviders","syncidentityproviders","syncsets","syncsetinstances","clusterdeprovisions","clusterdeprovisionrequests","clusterstates"],"verbs":["get","list","watch"]},{"apiGroups":["hive.openshift.io"],"resources":["clusterimagesets","hiveconfigs","selectorsyncsets","select
View test.go
func TestAllSyncSetsAppliedDuration(t *testing.T) {
apis.AddToScheme(scheme.Scheme)
now := metav1.Now()
cd := testClusterDeployment()
cdInstalledTimestamp := metav1.NewTime(now.Add(-time.Hour * 1))
cd.Status.InstalledTimestamp = &cdInstalledTimestamp
ss := testMatchingSyncSet
View ovirt.diff
diff --git pkg/clusterresource/ovirt.go pkg/clusterresource/ovirt.go
index f73ea05c..e4604d09 100644
--- pkg/clusterresource/ovirt.go
+++ pkg/clusterresource/ovirt.go
@@ -90,7 +90,17 @@ func (p *OvirtCloudBuilder) addClusterDeploymentPlatform(o *Builder, cd *hivev1.
}
func (p *OvirtCloudBuilder) addMachinePoolPlatform(o *Builder, mp *hivev1.MachinePool) {
- mp.Spec.Platform.Ovirt = &hivev1ovirt.MachinePool{}
+ mp.Spec.Platform.Ovirt = &hivev1ovirt.MachinePool{
View make
hive (master)  make
gofmt -w -s pkg contrib
go vet -mod=vendor ./pkg/... ./cmd/... ./contrib/...
cd v1alpha1apiserver && go vet -mod=vendor ./cmd/... ./pkg/...
/home/abutcher/go/src/github.com/openshift/hive/v1alpha1apiserver
go install -mod=vendor k8s.io/code-generator/cmd/deepcopy-gen
go install -mod=vendor k8s.io/code-generator/cmd/conversion-gen
go install -mod=vendor k8s.io/code-generator/cmd/defaulter-gen
go install -mod=vendor k8s.io/code-generator/cmd/client-gen
go install -mod=vendor sigs.k8s.io/controller-tools/cmd/controller-gen
View nonsense.diff
1a0d293a - (HEAD -> syncset-errors) vendor tmp (17 hours ago) <Andrew Butcher>
diff --git go.sum go.sum
index 104f1381..f1c9433b 100644
--- go.sum
+++ go.sum
@@ -71,7 +71,6 @@ github.com/Azure/go-autorest/autorest/date v0.2.0 h1:yW+Zlqf26583pE43KhfnhFcdmSW
github.com/Azure/go-autorest/autorest/date v0.2.0/go.mod h1:vcORJHLJEh643/Ioh9+vPmf1Ij9AEBM5FuBIXLmIy0g=
github.com/Azure/go-autorest/autorest/mocks v0.1.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0=
github.com/Azure/go-autorest/autorest/mocks v0.2.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0=
-github.com/Azure/go-autorest/autorest/mocks v0.3.0 h1:qJumjCaCudz+OcqE9/XtEPfvtOjOmKaui4EOpFI6zZc=
View gist:387ed348524a1576449bd35fa3895b06
➜ hive (syncset-errors) ✗ make test
go install -mod=vendor k8s.io/code-generator/cmd/deepcopy-gen
go install -mod=vendor k8s.io/code-generator/cmd/conversion-gen
go install -mod=vendor k8s.io/code-generator/cmd/defaulter-gen
go install -mod=vendor k8s.io/code-generator/cmd/client-gen
go install -mod=vendor sigs.k8s.io/controller-tools/cmd/controller-gen
go install -mod=vendor github.com/jteeuwen/go-bindata/go-bindata
go install -mod=vendor github.com/golang/mock/mockgen
go install -mod=vendor golang.org/x/lint/golint
go install -mod=vendor github.com/golangci/golangci-lint/cmd/golangci-lint
View gist:d570f360155de7b67ccb8b2e74f4a323
DEBU[0337] loading SSH key secret clusterDeployment=abutcher controller=remotemachineset namespace=myproject
INFO[0337] reconcile complete clusterDeployment=abutcher controller=unreachable elapsed=191.90019ms namespace=myproject
DEBU[0337] remote cluster version status clusterDeployment=abutcher clusterversion.status="{{4.2.4 quay.io/openshift-release-dev/ocp-release@sha256:cebce35c054f1fb066a4dc0a518064945087ac1f3637
fe23d2ee2b0c433d6ba8 false} [{Completed 2019-11-11 11:48:10 -0500 EST 2019-11-11 12:06:16 -0500 EST 4.2.4 quay.io/openshift-release-dev/ocp-release@sha256:cebce35c054f1fb066a4dc0a518064945087ac1f3637fe23d2ee2
b0c433d6ba8 false}] 1 gd3peR_jS2k= [{Available True 2019-11-11 12:06:16 -0500 EST Done applying 4.2.4} {Failing False 2019-11-11 11:54:17 -0500 EST } {Progressing False 2019-11-11 12:06:16 -0500 EST Cluste
r version is 4.2.4} {RetrievedUpdates False 2019-11-11 11:48:10 -0500 EST RemoteFailed Unable to retrieve available up
View gist:9f73753d75a968f74bad85f6df71ca89
$ make deploy
go generate ./pkg/... ./cmd/...
hack/update-bindata.sh
go run vendor/sigs.k8s.io/controller-tools/cmd/controller-gen/main.go crd
[debug] name="BaseDomain"
[debug] type="string"
[debug] JSONPath=".spec.baseDomain"
[debug] name="Installed"
[debug] type="boolean"
View gist:5af66737ddc7420695b44e6e30c87b77
apiVersion: cluster.k8s.io/v1alpha1
kind: Machine
metadata:
creationTimestamp: 2019-02-13T19:17:07Z
finalizers:
- machine.cluster.k8s.io
generateName: abutcher-hive-worker-us-east-1a-
generation: 1
labels:
sigs.k8s.io/cluster-api-cluster: abutcher-hive