Skip to content

Commit

Permalink
Merge pull request openshift#4344 from mkowalski/OCPBUGS-32348-2
Browse files Browse the repository at this point in the history
OCPBUGS-32348: Make logging configurable for on-prem components
  • Loading branch information
openshift-merge-bot[bot] authored Jun 20, 2024
2 parents 545d9a2 + d2aff6e commit 6498d69
Show file tree
Hide file tree
Showing 3 changed files with 129 additions and 0 deletions.
121 changes: 121 additions & 0 deletions install/0000_80_machine-config_03_rbac.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,3 +71,124 @@ subjects:
- kind: ServiceAccount
name: prometheus-k8s
namespace: openshift-monitoring
---
# Role host-networking-services lets system:node read config maps. This is needed in order to allow
# configuring log level (and in the future more parameters) of static pods deployed in the
# openshift-*-infra namespace.
# Because host networking components right now only run on on-prem platforms, we create RoleBinding
# explicitly only in namespaces for OpenStack, BareMetal, vSphere and Nutanix.
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: host-networking-services
namespace: openshift-openstack-infra
annotations:
include.release.openshift.io/self-managed-high-availability: "true"
include.release.openshift.io/single-node-developer: "true"
rules:
- apiGroups: [""]
resources: ["configmaps"]
verbs: ["get", "list", "watch"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: host-networking-services
namespace: openshift-kni-infra
annotations:
include.release.openshift.io/self-managed-high-availability: "true"
include.release.openshift.io/single-node-developer: "true"
rules:
- apiGroups: [""]
resources: ["configmaps"]
verbs: ["get", "list", "watch"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: host-networking-services
namespace: openshift-vsphere-infra
annotations:
include.release.openshift.io/self-managed-high-availability: "true"
include.release.openshift.io/single-node-developer: "true"
rules:
- apiGroups: [""]
resources: ["configmaps"]
verbs: ["get", "list", "watch"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: host-networking-services
namespace: openshift-nutanix-infra
annotations:
include.release.openshift.io/self-managed-high-availability: "true"
include.release.openshift.io/single-node-developer: "true"
rules:
- apiGroups: [""]
resources: ["configmaps"]
verbs: ["get", "list", "watch"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: host-networking-system-node
namespace: openshift-openstack-infra
annotations:
include.release.openshift.io/self-managed-high-availability: "true"
include.release.openshift.io/single-node-developer: "true"
subjects:
- apiGroup: rbac.authorization.k8s.io
kind: Group
name: system:nodes
roleRef:
kind: Role
name: host-networking-services
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: host-networking-system-node
namespace: openshift-kni-infra
annotations:
include.release.openshift.io/self-managed-high-availability: "true"
include.release.openshift.io/single-node-developer: "true"
subjects:
- apiGroup: rbac.authorization.k8s.io
kind: Group
name: system:nodes
roleRef:
kind: Role
name: host-networking-services
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: host-networking-system-node
namespace: openshift-vsphere-infra
annotations:
include.release.openshift.io/self-managed-high-availability: "true"
include.release.openshift.io/single-node-developer: "true"
subjects:
- apiGroup: rbac.authorization.k8s.io
kind: Group
name: system:nodes
roleRef:
kind: Role
name: host-networking-services
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: host-networking-system-node
namespace: openshift-nutanix-infra
annotations:
include.release.openshift.io/self-managed-high-availability: "true"
include.release.openshift.io/single-node-developer: "true"
subjects:
- apiGroup: rbac.authorization.k8s.io
kind: Group
name: system:nodes
roleRef:
kind: Role
name: host-networking-services
4 changes: 4 additions & 0 deletions manifests/on-prem/keepalived.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,10 @@ spec:
value: "yes"
- name: IS_BOOTSTRAP
value: "yes"
- name: POD_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
command:
- dynkeepalived
- "/etc/kubernetes/kubeconfig"
Expand Down
4 changes: 4 additions & 0 deletions templates/common/on-prem/files/keepalived.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,10 @@ contents:
value: "yes"
- name: IS_BOOTSTRAP
value: "no"
- name: POD_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
command:
- /bin/bash
- -c
Expand Down

0 comments on commit 6498d69

Please sign in to comment.