Skip to content

Commit

Permalink
Update free5gc-operator package (#28)
Browse files Browse the repository at this point in the history
  • Loading branch information
tliron authored Jun 13, 2023
1 parent 12403ae commit 04de7b9
Show file tree
Hide file tree
Showing 11 changed files with 84 additions and 45 deletions.
4 changes: 3 additions & 1 deletion free5gc-operator/Kptfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
apiVersion: kpt.dev/v1
kind: Kptfile

metadata:
name: free5gc-operator
annotations:
config.kubernetes.io/local-config: "true"

info:
description: Operator package for free5gc Nephio integration
description: free5GC operator package
4 changes: 0 additions & 4 deletions free5gc-operator/app/controller/namespace.yaml

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole

metadata:
name: free5gc-operator-role
labels:
app.kubernetes.io/name: clusterrole
app.kubernetes.io/instance: free5gc-operator-role
app.kubernetes.io/component: operator
app.kubernetes.io/created-by: nephio
app.kubernetes.io/part-of: free5gc-operator

rules:
- apiGroups:
- ""
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding

metadata:
name: free5gc-operator-role-binding
labels:
app.kubernetes.io/name: free5gc-operator
app.kubernetes.io/name: clusterrolebinding
app.kubernetes.io/instance: free5gc-operator-role-binding
app.kubernetes.io/component: operator
app.kubernetes.io/created-by: nephio
app.kubernetes.io/part-of: free5gc-operator
name: free5gc-operator-role-binding

roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
Expand Down
Original file line number Diff line number Diff line change
@@ -1,33 +1,40 @@
apiVersion: apps/v1
kind: Deployment

metadata:
name: free5gc-operator-controller
namespace: free5gc
name: free5gc-operator
labels:
app.kubernetes.io/name: deployment
app.kubernetes.io/instance: free5gc-operator
app.kubernetes.io/component: operator
app.kubernetes.io/created-by: nephio
app.kubernetes.io/part-of: free5gc-operator

spec:
replicas: 1
selector:
matchLabels:
fn.kptgen.dev/controller: free5gc-operator-controller
fn.kptgen.dev/controller: free5gc-operator
template:
metadata:
name: free5gc-operator
labels:
app.kubernetes.io/component: tbd
app.kubernetes.io/instance: tbd
app.kubernetes.io/managed-by: kpt
app.kubernetes.io/name: free5gc-operator
app.kubernetes.io/name: deployment
app.kubernetes.io/instance: free5gc-operator
app.kubernetes.io/component: operator
app.kubernetes.io/created-by: nephio
app.kubernetes.io/part-of: free5gc-operator
app.kubernetes.io/version: tbd
fn.kptgen.dev/controller: free5gc-operator-controller
name: free5gc-operator-controller
spec:
serviceAccountName: free5gc-operator
containers:
- args:
- name: kube-rbac-proxy
image: gcr.io/kubebuilder/kube-rbac-proxy:v0.8.0
args:
- --secure-listen-address=0.0.0.0:8443
- --upstream=http://127.0.0.1:8080/
- --logtostderr=true
- --v=10
image: gcr.io/kubebuilder/kube-rbac-proxy:v0.8.0
name: kube-rbac-proxy
ports:
- containerPort: 8443
name: https
Expand All @@ -38,26 +45,26 @@ spec:
requests:
cpu: 5m
memory: 64Mi
- args:
- name: operator
image: docker.io/nephio/free5gc-operator:latest
command:
- /free5gc-operator
args:
- --health-probe-bind-address=:8081
- --metrics-bind-address=127.0.0.1:8080
- --leader-elect
command:
- /manager
env:
- name: POD_NAMESPACE
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: metadata.namespace
image: nephio/free5gc-operator:latest
livenessProbe:
httpGet:
path: /healthz
port: 8081
initialDelaySeconds: 15
periodSeconds: 20
name: controller
readinessProbe:
httpGet:
path: /readyz
Expand All @@ -76,4 +83,3 @@ spec:
capabilities:
drop:
- ALL
serviceAccountName: free5gc-operator
11 changes: 11 additions & 0 deletions free5gc-operator/operator/namespace.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
apiVersion: v1
kind: Namespace

metadata:
name: free5gc
labels:
app.kubernetes.io/name: namespace
app.kubernetes.io/instance: free5gc
app.kubernetes.io/component: operator
app.kubernetes.io/created-by: nephio
app.kubernetes.io/part-of: free5gc-operator
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: Role

metadata:
namespace: free5gc
name: free5gc-operator-leader-election-role
labels:
app.kubernetes.io/name: free5gc-operator
app.kubernetes.io/name: role
app.kubernetes.io/instance: free5gc-operator-leader-election-role
app.kubernetes.io/component: operator
app.kubernetes.io/created-by: nephio
app.kubernetes.io/part-of: free5gc-operator
name: free5gc-operator-leader-election-role
namespace: free5gc

rules:
- apiGroups:
- ""
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding

metadata:
namespace: free5gc
name: free5gc-operator-leader-election-role-binding
labels:
app.kubernetes.io/component: tbd
app.kubernetes.io/instance: tbd
app.kubernetes.io/managed-by: kpt
app.kubernetes.io/name: free5gc-operator
app.kubernetes.io/name: rolebinding
app.kubernetes.io/instance: free5gc-operator-leader-election-role-binding
app.kubernetes.io/component: operator
app.kubernetes.io/created-by: nephio
app.kubernetes.io/part-of: free5gc-operator
app.kubernetes.io/version: tbd
name: free5gc-operator-leader-election-role-binding
namespace: free5gc

roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
Expand Down
12 changes: 12 additions & 0 deletions free5gc-operator/operator/serviceaccount.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
apiVersion: v1
kind: ServiceAccount

metadata:
namespace: free5gc
name: free5gc-operator
labels:
app.kubernetes.io/name: serviceaccount
app.kubernetes.io/instance: free5gc-operator
app.kubernetes.io/component: operator
app.kubernetes.io/created-by: nephio
app.kubernetes.io/part-of: free5gc-operator
4 changes: 3 additions & 1 deletion free5gc-operator/package-context.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
apiVersion: v1
kind: ConfigMap

metadata:
name: kptfile.kpt.dev
annotations:
config.kubernetes.io/local-config: "true"

data:
name: example
name: nehpio

0 comments on commit 04de7b9

Please sign in to comment.