Skip to content

Commit

Permalink
remove docker sock dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
ganga1980 committed Feb 6, 2024
1 parent 0b30796 commit 917f6d1
Show file tree
Hide file tree
Showing 7 changed files with 2 additions and 297 deletions.
2 changes: 0 additions & 2 deletions build/linux/installer/datafiles/base_container.data
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,6 @@ MAINTAINER: 'Microsoft Corporation'
/etc/fluent/plugin/constants.rb; source/plugins/ruby/constants.rb; 644; root; root
/etc/fluent/plugin/ContainerInventoryState.rb; source/plugins/ruby/ContainerInventoryState.rb; 644; root; root
/etc/fluent/plugin/CustomMetricsUtils.rb; source/plugins/ruby/CustomMetricsUtils.rb; 644; root; root
/etc/fluent/plugin/DockerApiClient.rb; source/plugins/ruby/DockerApiClient.rb; 644; root; root
/etc/fluent/plugin/DockerApiRestHelper.rb; source/plugins/ruby/DockerApiRestHelper.rb; 644; root; root
/etc/fluent/plugin/kubelet_utils.rb; source/plugins/ruby/kubelet_utils.rb; 644; root; root
/etc/fluent/plugin/proxy_utils.rb; source/plugins/ruby/proxy_utils.rb; 644; root; root
/etc/fluent/plugin/kubernetes_container_inventory.rb; source/plugins/ruby/kubernetes_container_inventory.rb; 644; root; root
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,6 @@ spec:
name: host-root
readOnly: true
mountPropagation: HostToContainer
- mountPath: /var/run/host
name: docker-sock
- mountPath: /var/log
name: host-log
- mountPath: /var/lib/docker/containers
Expand Down Expand Up @@ -265,9 +263,6 @@ spec:
- name: host-root
hostPath:
path: /
- name: docker-sock
hostPath:
path: /var/run
- name: container-hostname
hostPath:
path: /etc/hostname
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,6 @@ spec:
- containerPort: 25224
protocol: UDP
volumeMounts:
- mountPath: /var/run/host
name: docker-sock
- mountPath: /var/log
name: host-log
- mountPath: /var/lib/docker/containers
Expand Down Expand Up @@ -178,9 +176,6 @@ spec:
{{- end }}
{{- end }}
volumes:
- name: docker-sock
hostPath:
path: /var/run
- name: container-hostname
hostPath:
path: /etc/hostname
Expand Down
10 changes: 0 additions & 10 deletions kubernetes/ama-logs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -464,8 +464,6 @@ spec:
name: host-root
readOnly: true
mountPropagation: HostToContainer
- mountPath: /var/run/host
name: docker-sock
- mountPath: /var/run/mdsd-ci
name: mdsd-sock
- mountPath: /var/log
Expand Down Expand Up @@ -609,9 +607,6 @@ spec:
- name: host-root
hostPath:
path: /
- name: docker-sock
hostPath:
path: /var/run
- name: mdsd-sock
hostPath:
path: /var/run/mdsd-ci
Expand Down Expand Up @@ -811,8 +806,6 @@ spec:
- containerPort: 25224
protocol: UDP
volumeMounts:
- mountPath: /var/run/host
name: docker-sock
- mountPath: /var/log
name: host-log
- mountPath: /etc/kubernetes/host
Expand Down Expand Up @@ -880,9 +873,6 @@ spec:
- operator: "Exists"
effect: "PreferNoSchedule"
volumes:
- name: docker-sock
hostPath:
path: /var/run
- name: container-hostname
hostPath:
path: /etc/hostname
Expand Down
14 changes: 2 additions & 12 deletions source/plugins/ruby/ApplicationInsightsUtility.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
class ApplicationInsightsUtility
require_relative "lib/application_insights"
require_relative "omslog"
require_relative "DockerApiClient"
require_relative "oms_common"
require_relative "proxy_utils"
require "json"
Expand Down Expand Up @@ -38,7 +37,8 @@ class ApplicationInsightsUtility
@@proxy = (ProxyUtils.getProxyConfiguration)
end

@@controllerType = {"daemonset" => "DS", "replicaset" => "RS"}
@@controllerType = { "daemonset" => "DS", "replicaset" => "RS" }

def initialize
end

Expand Down Expand Up @@ -157,15 +157,6 @@ def getContainerRuntimeInfo()
if !containerRuntime.nil? && !containerRuntime.empty?
# cri field holds either containerRuntime for non-docker or Dockerversion if its docker
@@CustomProperties["cri"] = containerRuntime
# Not doing this for windows since docker is being deprecated soon and we dont want to bring in the socket dependency.
if !@@isWindows.nil? && @@isWindows == false
if containerRuntime.casecmp("docker") == 0
dockerInfo = DockerApiClient.dockerInfo
if (!dockerInfo.nil? && !dockerInfo.empty?)
@@CustomProperties["cri"] = dockerInfo["Version"]
end
end
end
end
rescue => errorStr
$log.warn("Exception in AppInsightsUtility: getContainerRuntimeInfo - error: #{errorStr}")
Expand Down Expand Up @@ -363,6 +354,5 @@ def sendAPIResponseTelemetry(responseCode, resource, metricName, apiResponseCode
$log.warn("Exception in AppInsightsUtility: sendAPIResponseTelemetry failed with an error: #{err}")
end
end

end
end
208 changes: 0 additions & 208 deletions source/plugins/ruby/DockerApiClient.rb

This file was deleted.

55 changes: 0 additions & 55 deletions source/plugins/ruby/DockerApiRestHelper.rb

This file was deleted.

0 comments on commit 917f6d1

Please sign in to comment.