Skip to content

Commit

Permalink
Remove metrics port from backup-driver deployment (#601)
Browse files Browse the repository at this point in the history
Signed-off-by: Deepak Kinni <[email protected]>
  • Loading branch information
deepakkinni authored Jan 16, 2025
1 parent 9b56f04 commit ed30541
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 46 deletions.
8 changes: 0 additions & 8 deletions deployment/create-deployment-for-backupdriver-guest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,6 @@ spec:
type: RollingUpdate
template:
metadata:
annotations:
prometheus.io/path: /metrics
prometheus.io/port: "8085"
prometheus.io/scrape: "true"
creationTimestamp: null
labels:
component: velero
Expand All @@ -55,10 +51,6 @@ spec:
image: dpcpinternal/backup-driver:<backup-driver image tag>
imagePullPolicy: IfNotPresent
name: backup-driver
ports:
- containerPort: 8085
name: metrics
protocol: TCP
resources: {}
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
Expand Down
8 changes: 0 additions & 8 deletions deployment/create-deployment-for-backupdriver.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,6 @@ spec:
type: RollingUpdate
template:
metadata:
annotations:
prometheus.io/path: /metrics
prometheus.io/port: "8085"
prometheus.io/scrape: "true"
creationTimestamp: null
labels:
component: velero
Expand All @@ -55,10 +51,6 @@ spec:
image: dpcpinternal/backup-driver:<backup-driver image tag>
imagePullPolicy: IfNotPresent
name: backup-driver
ports:
- containerPort: 8085
name: metrics
protocol: TCP
resources: {}
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
Expand Down
8 changes: 0 additions & 8 deletions deployment/create-deployment-for-plugin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,6 @@ spec:
type: RollingUpdate
template:
metadata:
annotations:
prometheus.io/path: /metrics
prometheus.io/port: "8085"
prometheus.io/scrape: "true"
creationTimestamp: null
labels:
component: velero
Expand All @@ -72,10 +68,6 @@ spec:
image: gcr.io/heptio-images/velero:v1.1.0
imagePullPolicy: IfNotPresent
name: velero
ports:
- containerPort: 8085
name: metrics
protocol: TCP
resources: {}
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
Expand Down
1 change: 0 additions & 1 deletion pkg/install/deployment.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@ func Deployment(namespace string, opts ...podTemplateOption) *appsv1.Deployment
{
Name: "backup-driver",
Image: c.image,
Ports: containerPorts(),
ImagePullPolicy: pullPolicy,
Command: []string{
"/backup-driver",
Expand Down
33 changes: 12 additions & 21 deletions pkg/install/install.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,17 +67,17 @@ var CRDsList = []string{

// DefaultImage is the default image to use for the Velero deployment and restic daemonset containers.
var (
DefaultDatamgrImage = imageRegistry() + "/" + constants.DataManagerForPlugin + ":" + imageVersion()
DefaultDatamgrPodCPURequest = "0"
DefaultDatamgrPodMemRequest = "0"
DefaultDatamgrPodCPULimit = "0"
DefaultDatamgrPodMemLimit = "0"

DefaultBackupDriverImage = imageRegistry() + "/" + constants.BackupDriverForPlugin + ":" + imageVersion()
DefaultBackupDriverPodCPURequest = "0"
DefaultBackupDriverPodMemRequest = "0"
DefaultBackupDriverPodCPULimit = "0"
DefaultBackupDriverPodMemLimit = "0"
DefaultDatamgrImage = imageRegistry() + "/" + constants.DataManagerForPlugin + ":" + imageVersion()
DefaultDatamgrPodCPURequest = "0"
DefaultDatamgrPodMemRequest = "0"
DefaultDatamgrPodCPULimit = "0"
DefaultDatamgrPodMemLimit = "0"

DefaultBackupDriverImage = imageRegistry() + "/" + constants.BackupDriverForPlugin + ":" + imageVersion()
DefaultBackupDriverPodCPURequest = "0"
DefaultBackupDriverPodMemRequest = "0"
DefaultBackupDriverPodCPULimit = "0"
DefaultBackupDriverPodMemLimit = "0"
)

type PodOptions struct {
Expand All @@ -92,7 +92,7 @@ type PodOptions struct {
SecretAdd bool
MasterAffinity bool
HostNetwork bool
Features []string
Features []string
}

// Use "latest" if the build process didn't supply a version
Expand Down Expand Up @@ -124,15 +124,6 @@ func objectMeta(namespace, name string) metav1.ObjectMeta {
}
}

func containerPorts() []corev1.ContainerPort {
return []corev1.ContainerPort{
{
Name: "metrics",
ContainerPort: 8085,
},
}
}

// createResource attempts to create a resource in the cluster.
// If the resource already exists in the cluster, it's merely logged.
func createResource(r *unstructured.Unstructured, factory client.DynamicFactory, w io.Writer) error {
Expand Down

0 comments on commit ed30541

Please sign in to comment.