Skip to content

Commit

Permalink
Security updates and env variables added for some containers (#42)
Browse files Browse the repository at this point in the history
  • Loading branch information
anjan-keysight authored Sep 26, 2024
1 parent f75d4d7 commit 9a1bb22
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 12 deletions.
3 changes: 3 additions & 0 deletions config/default/manager_auth_proxy_patch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ spec:
runAsGroup: 1000
seccompProfile:
type: RuntimeDefault
capabilities:
drop:
- all
- name: manager
args:
- "--health-probe-bind-address=:8081"
Expand Down
3 changes: 3 additions & 0 deletions config/manager/manager.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ spec:
runAsGroup: 1000
seccompProfile:
type: RuntimeDefault
capabilities:
drop:
- all
livenessProbe:
httpGet:
path: /healthz
Expand Down
12 changes: 10 additions & 2 deletions config/rbac/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,22 @@ rules:
resources:
- configmaps
- pods
- secrets
- services
verbs:
- create
- delete
- get
- list
- patch
- watch
- apiGroups:
- ""
resources:
- secrets
verbs:
- create
- delete
- get
- list
- update
- watch
- apiGroups:
Expand Down
19 changes: 10 additions & 9 deletions controllers/ixiatg_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -207,10 +207,10 @@ type location struct {
//+kubebuilder:rbac:groups=network.keysight.com,resources=ixiatgs,verbs=get;list;watch;create;update;patch;delete
//+kubebuilder:rbac:groups=network.keysight.com,resources=ixiatgs/status,verbs=get;update;patch
//+kubebuilder:rbac:groups=network.keysight.com,resources=ixiatgs/finalizers,verbs=update
//+kubebuilder:rbac:groups=core,resources=pods,verbs=get;list;watch;create;update;patch;delete
//+kubebuilder:rbac:groups=core,resources=secrets,verbs=get;list;watch;create;update;patch;delete
//+kubebuilder:rbac:groups=core,resources=configmaps,verbs=get;list;watch;create;update;patch;delete
//+kubebuilder:rbac:groups=core,resources=services,verbs=get;list;watch;create;update;patch;delete
//+kubebuilder:rbac:groups=core,resources=pods,verbs=get;list;watch;create;delete
//+kubebuilder:rbac:groups=core,resources=secrets,verbs=get;list;watch;create;update;delete
//+kubebuilder:rbac:groups=core,resources=configmaps,verbs=get;list;watch;create;delete
//+kubebuilder:rbac:groups=core,resources=services,verbs=get;list;watch;create;delete

// Reconcile is part of the main kubernetes reconciliation loop which aims to
// move the current state of the cluster closer to the desired state.
Expand Down Expand Up @@ -650,11 +650,12 @@ func (r *IxiaTGReconciler) loadRelInfo(ctx context.Context, release string, relD
case IMAGE_TRAFFIC_ENG:
compRef.ContainerName = IMAGE_TRAFFIC_ENG
compRef.DefEnv = map[string]string{
"OPT_LISTEN_PORT": strconv.Itoa(int(TRAFFIC_ENG_PORT)),
"ARG_CORE_LIST": "2 3 4",
"ARG_IFACE_LIST": "virtual@af_packet,eth1",
"OPT_NO_HUGEPAGES": "Yes",
"DEFAULT_PORT_SPEED": "1000",
"OPT_LISTEN_PORT": strconv.Itoa(int(TRAFFIC_ENG_PORT)),
"ARG_CORE_LIST": "2 3 4",
"ARG_IFACE_LIST": "virtual@af_packet,eth1",
"OPT_NO_HUGEPAGES": "Yes",
"OPT_DEFAULT_PORT_SPEED": "1000",
"OPT_ADAPTIVE_CPU_USAGE": "",
}
case IMAGE_PROTOCOL_ENG:
compRef.ContainerName = IMAGE_PROTOCOL_ENG
Expand Down
2 changes: 1 addition & 1 deletion version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.3.31
0.3.32

0 comments on commit 9a1bb22

Please sign in to comment.