Skip to content

Commit a3fcf52

Browse files
committed
Fix deprecation notice to make gocritic happy.
Signed-off-by: Lokesh Mandvekar <[email protected]>
1 parent 1afe2ce commit a3fcf52

File tree

7 files changed

+15
-0
lines changed

7 files changed

+15
-0
lines changed

libpod/container_config.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,11 +253,13 @@ type ContainerNetworkConfig struct {
253253
// StaticIP is a static IP to request for the container.
254254
// This cannot be set unless CreateNetNS is set.
255255
// If not set, the container will be dynamically assigned an IP by CNI.
256+
//
256257
// Deprecated: Do no use this anymore, this is only for DB backwards compat.
257258
StaticIP net.IP `json:"staticIP,omitempty"`
258259
// StaticMAC is a static MAC to request for the container.
259260
// This cannot be set unless CreateNetNS is set.
260261
// If not set, the container will be dynamically assigned a MAC by CNI.
262+
//
261263
// Deprecated: Do no use this anymore, this is only for DB backwards compat.
262264
StaticMAC types.HardwareAddr `json:"staticMAC,omitempty"`
263265
// PortMappings are the ports forwarded to the container's network
@@ -314,6 +316,7 @@ type ContainerNetworkConfig struct {
314316
// Please note that these can be altered at runtime. The actual list is
315317
// stored in the DB and should be retrieved from there; this is only the
316318
// set of networks the container was *created* with.
319+
//
317320
// Deprecated: Do no use this anymore, this is only for DB backwards compat.
318321
// Also note that we need to keep the old json tag to decode from DB correctly
319322
NetworksDeprecated []string `json:"networks,omitempty"`

pkg/bindings/containers/types.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,7 @@ type WaitOptions struct {
238238
// Time interval to wait before polling for completion.
239239
Interval *string
240240
// Container status to wait on.
241+
//
241242
// Deprecated: use Conditions instead.
242243
Condition []define.ContainerStatus
243244
}

pkg/k8s.io/api/core/v1/annotation_key_constants.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,18 @@ const (
3636

3737
// SeccompPodAnnotationKey represents the key of a seccomp profile applied
3838
// to all containers of a pod.
39+
//
3940
// Deprecated: set a pod security context `seccompProfile` field.
4041
SeccompPodAnnotationKey string = "seccomp.security.alpha.kubernetes.io/pod"
4142

4243
// SeccompContainerAnnotationKeyPrefix represents the key of a seccomp profile applied
4344
// to one container of a pod.
45+
//
4446
// Deprecated: set a container security context `seccompProfile` field.
4547
SeccompContainerAnnotationKeyPrefix string = "container.seccomp.security.alpha.kubernetes.io/"
4648

4749
// SeccompProfileRuntimeDefault represents the default seccomp profile used by container runtime.
50+
//
4851
// Deprecated: set a pod or container security context `seccompProfile` of type "RuntimeDefault" instead.
4952
SeccompProfileRuntimeDefault string = "runtime/default"
5053

@@ -71,6 +74,7 @@ const (
7174
AppArmorBetaProfileNameUnconfined = "unconfined"
7275

7376
// DeprecatedSeccompProfileDockerDefault represents the default seccomp profile used by docker.
77+
//
7478
// Deprecated: set a pod or container security context `seccompProfile` of type "RuntimeDefault" instead.
7579
DeprecatedSeccompProfileDockerDefault string = "docker/default"
7680

pkg/k8s.io/api/core/v1/types.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1463,6 +1463,7 @@ const (
14631463
PodFailed PodPhase = "Failed"
14641464
// PodUnknown means that for some reason the state of the pod could not be obtained, typically due
14651465
// to an error in communicating with the host of the pod.
1466+
//
14661467
// Deprecated: It isn't being set since 2015 (74da3b14b0c0f658b3bb8d2def5094686d0e9095)
14671468
PodUnknown PodPhase = "Unknown"
14681469
)
@@ -1882,6 +1883,7 @@ type PodSpec struct {
18821883
// +optional
18831884
ServiceAccountName string `json:"serviceAccountName,omitempty"`
18841885
// DeprecatedServiceAccount is a depreciated alias for ServiceAccountName.
1886+
//
18851887
// Deprecated: Use serviceAccountName instead.
18861888
// +k8s:conversion-gen=false
18871889
// +optional
@@ -4272,6 +4274,7 @@ type ComponentCondition struct {
42724274
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
42734275

42744276
// ComponentStatus (and ComponentStatusList) holds the cluster validation info.
4277+
//
42754278
// Deprecated: This API is deprecated in v1.19+
42764279
type ComponentStatus struct {
42774280
metav1.TypeMeta `json:",inline"`
@@ -4290,6 +4293,7 @@ type ComponentStatus struct {
42904293
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
42914294

42924295
// Status of all the conditions for the component as a list of ComponentStatus objects.
4296+
//
42934297
// Deprecated: This API is deprecated in v1.19+
42944298
type ComponentStatusList struct {
42954299
metav1.TypeMeta `json:",inline"`

pkg/specgen/podspecgen.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@ type PodNetworkConfig struct {
128128
// default network (unless it is part of this list).
129129
// Only available if NetNS is set to bridge.
130130
// Optional.
131+
//
131132
// Deprecated: as of podman 4.0 use "Networks" instead.
132133
CNINetworks []string `json:"cni_networks,omitempty"`
133134
// NoManageResolvConf indicates that /etc/resolv.conf should not be

pkg/specgen/specgen.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -511,6 +511,7 @@ type ContainerNetworkConfig struct {
511511
// default network (unless it is part of this list).
512512
// Only available if NetNS is set to bridge.
513513
// Optional.
514+
//
514515
// Deprecated: as of podman 4.0 use "Networks" instead.
515516
CNINetworks []string `json:"cni_networks,omitempty"`
516517
// UseImageResolvConf indicates that resolv.conf should not be managed

pkg/util/utils.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1202,6 +1202,7 @@ func LookupUser(name string) (*user.User, error) {
12021202

12031203
// SizeOfPath determines the file usage of a given path. it was called volumeSize in v1
12041204
// and now is made to be generic and take a path instead of a libpod volume
1205+
//
12051206
// Deprecated: use github.com/containers/storage/pkg/directory.Size() instead.
12061207
func SizeOfPath(path string) (uint64, error) {
12071208
size, err := directory.Size(path)

0 commit comments

Comments
 (0)