anthos-bm-utils/abm-nettest/nettest.yaml [78:283]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
---
apiVersion: v1
kind: Service
metadata:
  name: echoserver-non-hostnetwork
  namespace: nettest
spec:
  ports:
  - port: 80
    targetPort: 9222
    protocol: TCP
  selector:
    run: echoserver-non-hostnetwork
---
apiVersion: v1
kind: Service
metadata:
  name: echoserver-hostnetwork
  namespace: nettest
spec:
  ports:
  - port: 80
    targetPort: 9222
    protocol: TCP
  selector:
    run: echoserver-hostnetwork
---
kind: ServiceAccount
apiVersion: v1
metadata:
  name: nettest
  namespace: nettest
---
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
  name: nettest:nettest
rules:
  - apiGroups: [""]
    resources: ["nodes"]
    verbs: ["get", "list"]
  - apiGroups: [""]
    resources: ["pods"]
    verbs: ["get", "list", "watch"]
  - apiGroups: [""]
    resources: ["services"]
    verbs: ["create", "get", "list", "delete"]
  - apiGroups: [""]
    resources: ["endpoints"]
    verbs: ["get", "list"]
  - apiGroups: [""]
    resources: ["configmaps"]
    verbs: ["create", "get", "list", "delete"]
  - apiGroups: ["apps"]
    resources: ["daemonsets"]
    verbs: ["create", "get", "update", "delete"]
---
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
  name: nettest:nettest
subjects:
  - kind: ServiceAccount
    name: nettest
    namespace: nettest
roleRef:
  kind: ClusterRole
  name: nettest:nettest
  apiGroup: rbac.authorization.k8s.io
---
kind: ConfigMap
apiVersion: v1
metadata:
  name: nettest-engine
  namespace: nettest
data:
  engine.yaml: |
    steps:
    - sanityCheck: {}
    - setupTargets:
        targets:
          google.com:
            url:
              endpoint: www.google.com
          anthos.googleapis.com:
            url:
              endpoint: anthos.googleapis.com
          anthosaudit.googleapis.com:
            url:
              endpoint: anthosaudit.googleapis.com
          anthosgke.googleapis.com:
            url:
              endpoint: anthosgke.googleapis.com
          cloudresourcemanager.googleapis.com:
            url:
              endpoint: cloudresourcemanager.googleapis.com
          connectgateway.googleapis.com:
            url:
              endpoint: connectgateway.googleapis.com
          container.googleapis.com:
            url:
              endpoint: container.googleapis.com
          gkeconnect.googleapis.com:
            url:
              endpoint: gkeconnect.googleapis.com
          gkehub.googleapis.com:
            url:
              endpoint: gkehub.googleapis.com
          iam.googleapis.com:
            url:
              endpoint: iam.googleapis.com
          logging.googleapis.com:
            url:
              endpoint: logging.googleapis.com
          monitoring.googleapis.com:
            url:
              endpoint: monitoring.googleapis.com
          opsconfigmonitoring.googleapis.com:
            url:
              endpoint: opsconfigmonitoring.googleapis.com
          serviceusage.googleapis.com:
            url:
              endpoint: serviceusage.googleapis.com
          stackdriver.googleapis.com:
            url:
              endpoint: stackdriver.googleapis.com
          service:
            service:
              namespace: nettest
              name: echoserver-non-hostnetwork
              checkDNS: true
          service-hostnetwork:
            service:
              namespace: nettest
              name: echoserver-hostnetwork
          pods:
            endpoint:
              namespace: nettest
              name: echoserver-non-hostnetwork
          nodes:
            endpoint:
              namespace: nettest
              name: echoserver-hostnetwork
    - createCloudprobers:
        cloudproberImage: gcr.io/anthos-baremetal-release/cloudprober:release-0.11.7-gke.28
        probeFromCPNodes: true
    - waitFor:
        duration: 5m
    - validateMetrics: {}
---
kind: ConfigMap
apiVersion: v1
metadata:
  name: nettest-prometheus
  namespace: nettest
data:
  prometheus.yaml: |
    scrape_configs:
    - job_name: 'nettest'
      scrape_interval: 15s
      kubernetes_sd_configs:
      - role: pod
      relabel_configs:
      # Only scrape pods with specific annotation.
      - source_labels: [__meta_kubernetes_pod_annotation_nettest_should_be_scraped]
        action: keep
        regex: true
      # Only scrape the prometheus port.
      - source_labels: [__address__, __meta_kubernetes_pod_annotation_nettest_scrape_port]
        action: replace
        regex: ([^:]+)(?::\d+)?;(\d+)
        replacement: $1:$2
        target_label: __address__
---
apiVersion: v1
kind: Pod
metadata:
  name: nettest
  namespace: nettest
  labels:
    app: nettest
spec:
  containers:
  - name: nettest
    image: gcr.io/anthos-baremetal-release/nettest:v0.3.7-gke.9__linux_amd64
    imagePullPolicy: IfNotPresent
    command: ["/nettest"]
    args: ["-v=2", "-alsologtostderr", "-engine_config=/cfg/engine.yaml"]
    ports:
    - name: http
      containerPort: 8999
    volumeMounts:
    - name: nettest-engine
      mountPath: /cfg
  - name: prometheus
    imagePullPolicy: IfNotPresent
    image: gcr.io/anthos-baremetal-release/prometheus:2.18.1-gke.5
    args:
    - --config.file=/cfg/prometheus.yaml
    - --storage.tsdb.path=/prometheus/
    ports:
    - name: http
      containerPort: 9090
    volumeMounts:
    - name: nettest-prometheus
      mountPath: /cfg
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



anthos-bm-utils/abm-nettest/nettest_rhel.yaml [84:289]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
---
apiVersion: v1
kind: Service
metadata:
  name: echoserver-non-hostnetwork
  namespace: nettest
spec:
  ports:
  - port: 80
    targetPort: 9222
    protocol: TCP
  selector:
    run: echoserver-non-hostnetwork
---
apiVersion: v1
kind: Service
metadata:
  name: echoserver-hostnetwork
  namespace: nettest
spec:
  ports:
  - port: 80
    targetPort: 9222
    protocol: TCP
  selector:
    run: echoserver-hostnetwork
---
kind: ServiceAccount
apiVersion: v1
metadata:
  name: nettest
  namespace: nettest
---
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
  name: nettest:nettest
rules:
  - apiGroups: [""]
    resources: ["nodes"]
    verbs: ["get", "list"]
  - apiGroups: [""]
    resources: ["pods"]
    verbs: ["get", "list", "watch"]
  - apiGroups: [""]
    resources: ["services"]
    verbs: ["create", "get", "list", "delete"]
  - apiGroups: [""]
    resources: ["endpoints"]
    verbs: ["get", "list"]
  - apiGroups: [""]
    resources: ["configmaps"]
    verbs: ["create", "get", "list", "delete"]
  - apiGroups: ["apps"]
    resources: ["daemonsets"]
    verbs: ["create", "get", "update", "delete"]
---
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
  name: nettest:nettest
subjects:
  - kind: ServiceAccount
    name: nettest
    namespace: nettest
roleRef:
  kind: ClusterRole
  name: nettest:nettest
  apiGroup: rbac.authorization.k8s.io
---
kind: ConfigMap
apiVersion: v1
metadata:
  name: nettest-engine
  namespace: nettest
data:
  engine.yaml: |
    steps:
    - sanityCheck: {}
    - setupTargets:
        targets:
          google.com:
            url:
              endpoint: www.google.com
          anthos.googleapis.com:
            url:
              endpoint: anthos.googleapis.com
          anthosaudit.googleapis.com:
            url:
              endpoint: anthosaudit.googleapis.com
          anthosgke.googleapis.com:
            url:
              endpoint: anthosgke.googleapis.com
          cloudresourcemanager.googleapis.com:
            url:
              endpoint: cloudresourcemanager.googleapis.com
          connectgateway.googleapis.com:
            url:
              endpoint: connectgateway.googleapis.com
          container.googleapis.com:
            url:
              endpoint: container.googleapis.com
          gkeconnect.googleapis.com:
            url:
              endpoint: gkeconnect.googleapis.com
          gkehub.googleapis.com:
            url:
              endpoint: gkehub.googleapis.com
          iam.googleapis.com:
            url:
              endpoint: iam.googleapis.com
          logging.googleapis.com:
            url:
              endpoint: logging.googleapis.com
          monitoring.googleapis.com:
            url:
              endpoint: monitoring.googleapis.com
          opsconfigmonitoring.googleapis.com:
            url:
              endpoint: opsconfigmonitoring.googleapis.com
          serviceusage.googleapis.com:
            url:
              endpoint: serviceusage.googleapis.com
          stackdriver.googleapis.com:
            url:
              endpoint: stackdriver.googleapis.com
          service:
            service:
              namespace: nettest
              name: echoserver-non-hostnetwork
              checkDNS: true
          service-hostnetwork:
            service:
              namespace: nettest
              name: echoserver-hostnetwork
          pods:
            endpoint:
              namespace: nettest
              name: echoserver-non-hostnetwork
          nodes:
            endpoint:
              namespace: nettest
              name: echoserver-hostnetwork
    - createCloudprobers:
        cloudproberImage: gcr.io/anthos-baremetal-release/cloudprober:release-0.11.7-gke.28
        probeFromCPNodes: true
    - waitFor:
        duration: 5m
    - validateMetrics: {}
---
kind: ConfigMap
apiVersion: v1
metadata:
  name: nettest-prometheus
  namespace: nettest
data:
  prometheus.yaml: |
    scrape_configs:
    - job_name: 'nettest'
      scrape_interval: 15s
      kubernetes_sd_configs:
      - role: pod
      relabel_configs:
      # Only scrape pods with specific annotation.
      - source_labels: [__meta_kubernetes_pod_annotation_nettest_should_be_scraped]
        action: keep
        regex: true
      # Only scrape the prometheus port.
      - source_labels: [__address__, __meta_kubernetes_pod_annotation_nettest_scrape_port]
        action: replace
        regex: ([^:]+)(?::\d+)?;(\d+)
        replacement: $1:$2
        target_label: __address__
---
apiVersion: v1
kind: Pod
metadata:
  name: nettest
  namespace: nettest
  labels:
    app: nettest
spec:
  containers:
  - name: nettest
    image: gcr.io/anthos-baremetal-release/nettest:v0.3.7-gke.9__linux_amd64
    imagePullPolicy: IfNotPresent
    command: ["/nettest"]
    args: ["-v=2", "-alsologtostderr", "-engine_config=/cfg/engine.yaml"]
    ports:
    - name: http
      containerPort: 8999
    volumeMounts:
    - name: nettest-engine
      mountPath: /cfg
  - name: prometheus
    imagePullPolicy: IfNotPresent
    image: gcr.io/anthos-baremetal-release/prometheus:2.18.1-gke.5
    args:
    - --config.file=/cfg/prometheus.yaml
    - --storage.tsdb.path=/prometheus/
    ports:
    - name: http
      containerPort: 9090
    volumeMounts:
    - name: nettest-prometheus
      mountPath: /cfg
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



