Skip to content
Snippets Groups Projects
Commit 4d9bce46 authored by Lluis Gifre Renom's avatar Lluis Gifre Renom
Browse files

Pre-merge code cleanup

parent a106e903
No related branches found
No related tags found
2 merge requests!294Release TeraFlowSDN 4.0,!257Resolve "Create QoSProfile component"
...@@ -163,15 +163,6 @@ kubectl create secret generic kfk-kpi-data --namespace ${TFS_K8S_NAMESPACE} --ty ...@@ -163,15 +163,6 @@ kubectl create secret generic kfk-kpi-data --namespace ${TFS_K8S_NAMESPACE} --ty
--from-literal=KFK_SERVER_PORT=${KFK_SERVER_PORT} --from-literal=KFK_SERVER_PORT=${KFK_SERVER_PORT}
printf "\n" printf "\n"
echo "Create secret with CockroachDB data for QoSProfile"
kubectl create secret generic crdb-qos-profile-data --namespace ${TFS_K8S_NAMESPACE} --type='Opaque' \
--from-literal=CRDB_NAMESPACE=${CRDB_NAMESPACE} \
--from-literal=CRDB_SQL_PORT=${CRDB_SQL_PORT} \
--from-literal=CRDB_DATABASE=${CRDB_DATABASE_QOSPROFILE} \
--from-literal=CRDB_USERNAME=${CRDB_USERNAME} \
--from-literal=CRDB_PASSWORD=${CRDB_PASSWORD} \
--from-literal=CRDB_SSLMODE=require
printf "\n"
echo "Create secret with NATS data" echo "Create secret with NATS data"
NATS_CLIENT_PORT=$(kubectl --namespace ${NATS_NAMESPACE} get service ${NATS_NAMESPACE} -o 'jsonpath={.spec.ports[?(@.name=="client")].port}') NATS_CLIENT_PORT=$(kubectl --namespace ${NATS_NAMESPACE} get service ${NATS_NAMESPACE} -o 'jsonpath={.spec.ports[?(@.name=="client")].port}')
......
...@@ -23,6 +23,8 @@ spec: ...@@ -23,6 +23,8 @@ spec:
#replicas: 1 #replicas: 1
template: template:
metadata: metadata:
annotations:
config.linkerd.io/skip-outbound-ports: "4222"
labels: labels:
app: qos-profileservice app: qos-profileservice
spec: spec:
...@@ -37,9 +39,11 @@ spec: ...@@ -37,9 +39,11 @@ spec:
env: env:
- name: LOG_LEVEL - name: LOG_LEVEL
value: "INFO" value: "INFO"
- name: CRDB_DATABASE
value: "tfs_qos_profile"
envFrom: envFrom:
- secretRef: - secretRef:
name: crdb-qos-profile-data name: crdb-data
readinessProbe: readinessProbe:
exec: exec:
command: ["/bin/grpc_health_probe", "-addr=:20040"] command: ["/bin/grpc_health_probe", "-addr=:20040"]
...@@ -72,4 +76,26 @@ spec: ...@@ -72,4 +76,26 @@ spec:
- name: metrics - name: metrics
protocol: TCP protocol: TCP
port: 9192 port: 9192
targetPort: 9192 targetPort: 9192
\ No newline at end of file ---
apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: qos-profileservice-hpa
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: qos-profileservice
minReplicas: 1
maxReplicas: 20
metrics:
- type: Resource
resource:
name: cpu
target:
type: Utilization
averageUtilization: 80
#behavior:
# scaleDown:
# stabilizationWindowSeconds: 30
...@@ -49,10 +49,10 @@ message QoSProfile { ...@@ -49,10 +49,10 @@ message QoSProfile {
service QoSProfileService { service QoSProfileService {
rpc CreateQoSProfile (QoSProfile ) returns ( QoSProfile ) {} rpc CreateQoSProfile (QoSProfile ) returns ( QoSProfile ) {}
rpc UpdateQoSProfile (QoSProfile ) returns ( QoSProfile ) {} rpc UpdateQoSProfile (QoSProfile ) returns ( QoSProfile ) {}
rpc DeleteQoSProfile (context.QoSProfileId ) returns ( context.Empty ) {} rpc DeleteQoSProfile (context.QoSProfileId ) returns ( context.Empty ) {}
rpc GetQoSProfile (context.QoSProfileId ) returns ( QoSProfile ) {} rpc GetQoSProfile (context.QoSProfileId ) returns ( QoSProfile ) {}
rpc GetQoSProfiles (context.Empty ) returns (stream QoSProfile ) {} rpc GetQoSProfiles (context.Empty ) returns (stream QoSProfile ) {}
rpc GetConstraintListFromQoSProfile (QoDConstraintsRequest) returns (stream context.Constraint ) {} rpc GetConstraintListFromQoSProfile (QoDConstraintsRequest) returns (stream context.Constraint) {}
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment