diff options
author | Paul Holzinger <pholzing@redhat.com> | 2022-03-11 16:10:32 +0100 |
---|---|---|
committer | Paul Holzinger <pholzing@redhat.com> | 2022-03-15 14:48:08 +0100 |
commit | a0ad1f2ad46507f13a16d342b9ccf35a38bae3d5 (patch) | |
tree | 2b2d70b7961c6373a3ff3674cd909501739b80f9 /pkg/domain/infra | |
parent | 918fc88a983ea1c1ee7e0abb0fc1dce3c0a35be3 (diff) | |
download | podman-a0ad1f2ad46507f13a16d342b9ccf35a38bae3d5.tar.gz podman-a0ad1f2ad46507f13a16d342b9ccf35a38bae3d5.tar.bz2 podman-a0ad1f2ad46507f13a16d342b9ccf35a38bae3d5.zip |
remove unneeded k8s code
There is a lot of unneeded code, k8s is the by far the biggest
dependency in podman. We should remove as much as possible so that we
only have the stuff left that we use.
This is just a quick skim over the code which removes a lot of the
generated code and many packages that are now unused.
I know that this will be impossible to properly review. I will try to
make smaller changes in follow up work.
Right now this reduces about 8 MB in binary size!!!
[NO NEW TESTS NEEDED] Hopefully existing tests will catch any problems.
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
Diffstat (limited to 'pkg/domain/infra')
-rw-r--r-- | pkg/domain/infra/abi/play.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/pkg/domain/infra/abi/play.go b/pkg/domain/infra/abi/play.go index 0a9a0d04b..e16da4ed9 100644 --- a/pkg/domain/infra/abi/play.go +++ b/pkg/domain/infra/abi/play.go @@ -588,7 +588,7 @@ func (ic *ContainerEngine) playKubePVC(ctx context.Context, pvcYAML *v1.Persiste // Get pvc name. // This is the only required pvc attribute to create a podman volume. - name := pvcYAML.GetName() + name := pvcYAML.Name if strings.TrimSpace(name) == "" { return nil, fmt.Errorf("persistent volume claim name can not be empty") } @@ -596,13 +596,13 @@ func (ic *ContainerEngine) playKubePVC(ctx context.Context, pvcYAML *v1.Persiste // Create podman volume options. volOptions := []libpod.VolumeCreateOption{ libpod.WithVolumeName(name), - libpod.WithVolumeLabels(pvcYAML.GetLabels()), + libpod.WithVolumeLabels(pvcYAML.Labels), } // Get pvc annotations and create remaining podman volume options if available. // These are podman volume options that do not match any of the persistent volume claim // attributes, so they can be configured using annotations since they will not affect k8s. - for k, v := range pvcYAML.GetAnnotations() { + for k, v := range pvcYAML.Annotations { switch k { case util.VolumeDriverAnnotation: volOptions = append(volOptions, libpod.WithVolumeDriver(v)) |