Skip to content

Commit

Permalink
Remove old v1 import (#862)
Browse files Browse the repository at this point in the history
  • Loading branch information
psav authored Sep 15, 2023
1 parent 2ac1e1c commit ec46521
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions controllers/cloud.redhat.com/providers/utils/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import (

apps "k8s.io/api/apps/v1"
core "k8s.io/api/core/v1"
v1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/types"
"k8s.io/apimachinery/pkg/util/intstr"
Expand Down Expand Up @@ -244,12 +243,12 @@ var KubeLinterAnnotations = map[string]string{

const RCharSet = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"

func AddCertVolume(d *v1.PodSpec, dnn string) {
d.Volumes = append(d.Volumes, v1.Volume{
func AddCertVolume(d *core.PodSpec, dnn string) {
d.Volumes = append(d.Volumes, core.Volume{
Name: "tls-ca",
VolumeSource: v1.VolumeSource{
ConfigMap: &v1.ConfigMapVolumeSource{
LocalObjectReference: v1.LocalObjectReference{
VolumeSource: core.VolumeSource{
ConfigMap: &core.ConfigMapVolumeSource{
LocalObjectReference: core.LocalObjectReference{
Name: "openshift-service-ca.crt",
},
},
Expand All @@ -258,7 +257,7 @@ func AddCertVolume(d *v1.PodSpec, dnn string) {
for i, container := range d.Containers {
vms := container.VolumeMounts
if container.Name == dnn {
vms = append(vms, v1.VolumeMount{
vms = append(vms, core.VolumeMount{
Name: "tls-ca",
ReadOnly: true,
MountPath: "/cdapp/certs",
Expand All @@ -269,7 +268,7 @@ func AddCertVolume(d *v1.PodSpec, dnn string) {

for i, iContainer := range d.InitContainers {
vms := iContainer.VolumeMounts
vms = append(vms, v1.VolumeMount{
vms = append(vms, core.VolumeMount{
Name: "tls-ca",
ReadOnly: true,
MountPath: "/cdapp/certs",
Expand Down

0 comments on commit ec46521

Please sign in to comment.