Repository navigation
Conversation
| type PublicIP struct { | ||
| ID string | ||
| IP string | ||
| NetworkInterfaceID string |
There was a problem hiding this comment.
is this a network or a network interface on a server?
There was a problem hiding this comment.
This refers to the NetworkInterface of the (bastion) host. If empty, it means that the IP is not yet associated to any server.
| // IsNotFound reports whether err wraps ErrNotFound. | ||
| func IsNotFound(err error) bool { return errors.Is(err, ErrNotFound) } | ||
| func IsNotFound(err error) bool { return shared.IsNotFound(err) } | ||
|
|
||
| // IsUnauthorized reports whether err wraps ErrUnauthorized. | ||
| func IsUnauthorized(err error) bool { return errors.Is(err, ErrUnauthorized) } | ||
| func IsUnauthorized(err error) bool { return shared.IsUnauthorized(err) } | ||
|
|
||
| // IsInvalidInput reports whether err wraps ErrInvalidInput. | ||
| func IsInvalidInput(err error) bool { return errors.Is(err, ErrInvalidInput) } | ||
| func IsInvalidInput(err error) bool { return shared.IsInvalidInput(err) } | ||
|
|
||
| // IsConflict reports whether err wraps ErrConflict. | ||
| func IsConflict(err error) bool { return errors.Is(err, ErrConflict) } | ||
| func IsConflict(err error) bool { return shared.IsConflict(err) } | ||
|
|
||
| // IsTransient reports whether err wraps ErrTransient. | ||
| func IsTransient(err error) bool { return errors.Is(err, ErrTransient) } | ||
| func IsTransient(err error) bool { return shared.IsTransient(err) } | ||
|
|
||
| // IsRetryable reports whether err should trigger a requeue (conflict or | ||
| // transient). | ||
| func IsRetryable(err error) bool { | ||
| return IsConflict(err) || IsTransient(err) | ||
| } | ||
| // IsRetryable reports whether err should trigger a requeue (conflict or transient). | ||
| func IsRetryable(err error) bool { return shared.IsRetryable(err) } |
There was a problem hiding this comment.
why even keep these wrappers instead o using the shared package instead? or is this just a transient step while you are refactoring?
There was a problem hiding this comment.
I guess this is for an easier transition but not meant to be kept this way, right?
There was a problem hiding this comment.
I am open for both solutions, we can also do the "shotgun surgery" as discussed.
| func (s *ClusterScope) BastionSpec() infrav1.StackitBastionSpec { | ||
| return s.StackitCluster.Spec.Bastion | ||
| } | ||
|
|
||
| func (s *ClusterScope) BastionStatus() infrav1.StackitBastionStatus { | ||
| return s.StackitCluster.Status.Bastion | ||
| } |
There was a problem hiding this comment.
be aware this creates a reference by value not by pointer
why expose it like this anyways? just for the better ergonomics?
There was a problem hiding this comment.
This is based on the CRD schema, where these fields are defined as values and not as pointers.
In the future this will probably move to a dedicated scope for the bastion service anyway, so it is kind of temporary.
No description provided.