mirror of
https://github.com/containers/podman.git
synced 2025-11-29 01:28:22 +08:00
Fix deprecation notice to make gocritic happy.
Signed-off-by: Lokesh Mandvekar <lsm5@redhat.com>
This commit is contained in:
@@ -253,11 +253,13 @@ type ContainerNetworkConfig struct {
|
||||
// StaticIP is a static IP to request for the container.
|
||||
// This cannot be set unless CreateNetNS is set.
|
||||
// If not set, the container will be dynamically assigned an IP by CNI.
|
||||
//
|
||||
// Deprecated: Do no use this anymore, this is only for DB backwards compat.
|
||||
StaticIP net.IP `json:"staticIP,omitempty"`
|
||||
// StaticMAC is a static MAC to request for the container.
|
||||
// This cannot be set unless CreateNetNS is set.
|
||||
// If not set, the container will be dynamically assigned a MAC by CNI.
|
||||
//
|
||||
// Deprecated: Do no use this anymore, this is only for DB backwards compat.
|
||||
StaticMAC types.HardwareAddr `json:"staticMAC,omitempty"`
|
||||
// PortMappings are the ports forwarded to the container's network
|
||||
@@ -314,6 +316,7 @@ type ContainerNetworkConfig struct {
|
||||
// Please note that these can be altered at runtime. The actual list is
|
||||
// stored in the DB and should be retrieved from there; this is only the
|
||||
// set of networks the container was *created* with.
|
||||
//
|
||||
// Deprecated: Do no use this anymore, this is only for DB backwards compat.
|
||||
// Also note that we need to keep the old json tag to decode from DB correctly
|
||||
NetworksDeprecated []string `json:"networks,omitempty"`
|
||||
|
||||
@@ -238,6 +238,7 @@ type WaitOptions struct {
|
||||
// Time interval to wait before polling for completion.
|
||||
Interval *string
|
||||
// Container status to wait on.
|
||||
//
|
||||
// Deprecated: use Conditions instead.
|
||||
Condition []define.ContainerStatus
|
||||
}
|
||||
|
||||
@@ -36,15 +36,18 @@ const (
|
||||
|
||||
// SeccompPodAnnotationKey represents the key of a seccomp profile applied
|
||||
// to all containers of a pod.
|
||||
//
|
||||
// Deprecated: set a pod security context `seccompProfile` field.
|
||||
SeccompPodAnnotationKey string = "seccomp.security.alpha.kubernetes.io/pod"
|
||||
|
||||
// SeccompContainerAnnotationKeyPrefix represents the key of a seccomp profile applied
|
||||
// to one container of a pod.
|
||||
//
|
||||
// Deprecated: set a container security context `seccompProfile` field.
|
||||
SeccompContainerAnnotationKeyPrefix string = "container.seccomp.security.alpha.kubernetes.io/"
|
||||
|
||||
// SeccompProfileRuntimeDefault represents the default seccomp profile used by container runtime.
|
||||
//
|
||||
// Deprecated: set a pod or container security context `seccompProfile` of type "RuntimeDefault" instead.
|
||||
SeccompProfileRuntimeDefault string = "runtime/default"
|
||||
|
||||
@@ -71,6 +74,7 @@ const (
|
||||
AppArmorBetaProfileNameUnconfined = "unconfined"
|
||||
|
||||
// DeprecatedSeccompProfileDockerDefault represents the default seccomp profile used by docker.
|
||||
//
|
||||
// Deprecated: set a pod or container security context `seccompProfile` of type "RuntimeDefault" instead.
|
||||
DeprecatedSeccompProfileDockerDefault string = "docker/default"
|
||||
|
||||
|
||||
@@ -1463,6 +1463,7 @@ const (
|
||||
PodFailed PodPhase = "Failed"
|
||||
// PodUnknown means that for some reason the state of the pod could not be obtained, typically due
|
||||
// to an error in communicating with the host of the pod.
|
||||
//
|
||||
// Deprecated: It isn't being set since 2015 (74da3b14b0c0f658b3bb8d2def5094686d0e9095)
|
||||
PodUnknown PodPhase = "Unknown"
|
||||
)
|
||||
@@ -1882,6 +1883,7 @@ type PodSpec struct {
|
||||
// +optional
|
||||
ServiceAccountName string `json:"serviceAccountName,omitempty"`
|
||||
// DeprecatedServiceAccount is a depreciated alias for ServiceAccountName.
|
||||
//
|
||||
// Deprecated: Use serviceAccountName instead.
|
||||
// +k8s:conversion-gen=false
|
||||
// +optional
|
||||
@@ -4272,6 +4274,7 @@ type ComponentCondition struct {
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
|
||||
// ComponentStatus (and ComponentStatusList) holds the cluster validation info.
|
||||
//
|
||||
// Deprecated: This API is deprecated in v1.19+
|
||||
type ComponentStatus struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
@@ -4290,6 +4293,7 @@ type ComponentStatus struct {
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
|
||||
// Status of all the conditions for the component as a list of ComponentStatus objects.
|
||||
//
|
||||
// Deprecated: This API is deprecated in v1.19+
|
||||
type ComponentStatusList struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
|
||||
@@ -128,6 +128,7 @@ type PodNetworkConfig struct {
|
||||
// default network (unless it is part of this list).
|
||||
// Only available if NetNS is set to bridge.
|
||||
// Optional.
|
||||
//
|
||||
// Deprecated: as of podman 4.0 use "Networks" instead.
|
||||
CNINetworks []string `json:"cni_networks,omitempty"`
|
||||
// NoManageResolvConf indicates that /etc/resolv.conf should not be
|
||||
|
||||
@@ -511,6 +511,7 @@ type ContainerNetworkConfig struct {
|
||||
// default network (unless it is part of this list).
|
||||
// Only available if NetNS is set to bridge.
|
||||
// Optional.
|
||||
//
|
||||
// Deprecated: as of podman 4.0 use "Networks" instead.
|
||||
CNINetworks []string `json:"cni_networks,omitempty"`
|
||||
// UseImageResolvConf indicates that resolv.conf should not be managed
|
||||
|
||||
@@ -1202,6 +1202,7 @@ func LookupUser(name string) (*user.User, error) {
|
||||
|
||||
// SizeOfPath determines the file usage of a given path. it was called volumeSize in v1
|
||||
// and now is made to be generic and take a path instead of a libpod volume
|
||||
//
|
||||
// Deprecated: use github.com/containers/storage/pkg/directory.Size() instead.
|
||||
func SizeOfPath(path string) (uint64, error) {
|
||||
size, err := directory.Size(path)
|
||||
|
||||
Reference in New Issue
Block a user