Mark Old
|
8ccbf40fff
|
Add generated DeepCopy implementations for pkg/types/installconfig
|
2025-11-18 22:28:04 -08:00 |
|
W. Trevor King
|
ca6f6195fa
|
Revert "pkg/ipnet: Add DeepCopy and DeepCopyInto for IPNet"
This reverts commit 06739c665e, #276.
Devan's forking the config in Hive [1], so they no longer need us to
support embedding in Kubernetes objects.
[1]: https://github.com/openshift/installer/issues/256#issuecomment-423270461
|
2018-09-20 10:51:17 -07:00 |
|
W. Trevor King
|
06739c665e
|
pkg/ipnet: Add DeepCopy and DeepCopyInto for IPNet
Devan needs DeepCopyInto on IPNet as part of embed our types into
Hive's ClusterDeployment CRD [1]. You could generate these with
deepcopy-gen [2], but setting up automatic code generation is a bit
heavy for just these methods [3], so we're hand-coding for now.
[1]: https://github.com/openshift/installer/issues/256#issue-360875062
[2]: https://godoc.org/k8s.io/gengo/examples/deepcopy-gen
[3]: https://github.com/openshift/installer/pull/276#issuecomment-422871376
|
2018-09-19 12:31:02 -07:00 |
|
W. Trevor King
|
36d5eb0a47
|
pkg/ipnet: Teach IPNet.String() to handle nil receivers
Instead of panicking. This makes some comparisons easier, as you can
see from the test changes.
|
2018-09-19 11:48:49 -07:00 |
|
W. Trevor King
|
c756ba504f
|
pkg/ipnet: Provide an IPNet structure with CIDR serialization
Use CIDR notation [1] for serliazing IPNet structures so the values
are human editable (vs. the stdlib's base64 netmasks). It's
unfortunate that we can't update the stdlib to do this, but their
encodings are frozen [2].
[1]: https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing#CIDR_notation
[2]: https://github.com/golang/go/issues/12803#issuecomment-150673932
|
2018-09-06 16:59:10 -07:00 |
|