diff --git a/charts/hybrid-redact/templates/deployment.yaml b/charts/hybrid-redact/templates/deployment.yaml index cdca472..2f7d2c1 100644 --- a/charts/hybrid-redact/templates/deployment.yaml +++ b/charts/hybrid-redact/templates/deployment.yaml @@ -1,159 +1,3 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ include "akto.fullname" . }}-mini-runtime - {{ if .Values.keel.keel.enabled }} - annotations: - keel.sh/policy: force - keel.sh/trigger: poll - keel.sh/pollSchedule: "@every 60m" - {{ end }} - labels: - {{- include "akto.labels" . | nindent 4 }} -spec: - replicas: {{ .Values.mini_runtime.replicas }} - selector: - matchLabels: - app: {{ include "akto.fullname" . }}-mini-runtime - {{- include "akto.selectorLabels" . | nindent 6 }} - template: - metadata: - labels: - app: {{ include "akto.fullname" . }}-mini-runtime - {{- include "akto.selectorLabels" . | nindent 8 }} - spec: - containers: - {{ if .Values.mini_runtime.aktoApiSecurityRuntime.enabled }} - - env: - - name: MY_POD_NAMESPACE - valueFrom: - fieldRef: - fieldPath: metadata.namespace - - name: AKTO_ACCOUNT_NAME - value: {{ quote .Values.mini_runtime.aktoApiSecurityRuntime.env.aktoAccountName }} - - name: IS_KUBERNETES - value: "true" - - name: RUNTIME_MODE - value: "hybrid" - - name: AKTO_CONFIG_NAME - value: {{ quote .Values.mini_runtime.aktoApiSecurityRuntime.env.aktoConfigName }} - - name: AKTO_INSTANCE_TYPE - value: {{ quote .Values.mini_runtime.aktoApiSecurityRuntime.env.aktoInstanceType }} - - name: AKTO_KAFKA_BROKER_MAL - value: {{ quote .Values.mini_runtime.aktoApiSecurityRuntime.env.aktoKafkaBrokerMal - }} - - name: AKTO_KAFKA_BROKER_URL - value: {{ quote .Values.mini_runtime.aktoApiSecurityRuntime.env.aktoKafkaBrokerUrl - }} - - name: AKTO_KAFKA_GROUP_ID_CONFIG - value: {{ quote .Values.mini_runtime.aktoApiSecurityRuntime.env.aktoKafkaGroupIdConfig - }} - - name: AKTO_KAFKA_MAX_POLL_RECORDS_CONFIG - value: {{ quote .Values.mini_runtime.aktoApiSecurityRuntime.env.aktoKafkaMaxPollRecordsConfig - }} - - name: AKTO_KAFKA_TOPIC_NAME - value: {{ quote .Values.mini_runtime.aktoApiSecurityRuntime.env.aktoKafkaTopicName - }} - - name: AKTO_TRAFFIC_BATCH_SIZE - value: {{ quote .Values.mini_runtime.aktoApiSecurityRuntime.env.aktoTrafficBatchSize - }} - - name: AKTO_TRAFFIC_BATCH_TIME_SECS - value: {{ quote .Values.mini_runtime.aktoApiSecurityRuntime.env.aktoTrafficBatchTimeSecs - }} - - name: PUPPETEER_REPLAY_SERVICE_URL - value: {{ quote .Values.mini_runtime.aktoApiSecurityRuntime.env.puppeteerReplayServiceUrl - }} - - name: USE_HOSTNAME - value: {{ quote .Values.mini_runtime.aktoApiSecurityRuntime.env.useHostName}} - - name: DATABASE_ABSTRACTOR_SERVICE_URL - value: {{ quote .Values.mini_runtime.aktoApiSecurityRuntime.env.databaseAbstractorUrl}} - - name: DATABASE_ABSTRACTOR_SERVICE_TOKEN - value: {{ quote .Values.tokens.env.databaseAbstractorToken}} - - name: POSTGRES_URL - value: {{ quote .Values.tokens.env.postgresUrl}} - - name: POSTGRES_USER - value: {{ quote .Values.tokens.env.postgresUser}} - - name: POSTGRES_PASSWORD - value: {{ quote .Values.tokens.env.postgresPassword}} - - name: PROXY_URI - value: {{ quote .Values.tokens.env.proxyUri}} - - name: NO_PROXY - value: {{ quote .Values.tokens.env.noProxy}} - - name: KUBERNETES_CLUSTER_DOMAIN - value: {{ quote .Values.kubernetesClusterDomain }} - image: {{ .Values.mini_runtime.aktoApiSecurityRuntime.image.repository }}:{{ .Values.mini_runtime.aktoApiSecurityRuntime.image.tag - | default .Chart.AppVersion }} - imagePullPolicy: {{ .Values.mini_runtime.aktoApiSecurityRuntime.imagePullPolicy }} - name: akto-api-security-runtime - resources: {{- toYaml .Values.mini_runtime.aktoApiSecurityRuntime.resources | nindent 10 }} - {{ end }} - - env: - - name: ZOOKEEPER_CLIENT_PORT - value: {{ quote .Values.mini_runtime.zoo1.env.zookeeperClientPort }} - - name: ZOOKEEPER_SERVERS - value: {{ quote .Values.mini_runtime.zoo1.env.zookeeperServers }} - - name: ZOOKEEPER_SERVER_ID - value: {{ quote .Values.mini_runtime.zoo1.env.zookeeperServerId }} - - name: KAFKA_OPTS - value: {{ quote .Values.mini_runtime.zoo1.env.kafkaOpts }} - - name: KUBERNETES_CLUSTER_DOMAIN - value: {{ quote .Values.kubernetesClusterDomain }} - image: {{ .Values.mini_runtime.zoo1.image.repository }}:{{ .Values.mini_runtime.zoo1.image.tag - | default .Chart.AppVersion }} - name: zoo1 - ports: - - containerPort: 2181 - resources: {{- toYaml .Values.mini_runtime.zoo1.resources | nindent 10 }} - - env: - - name: MY_POD_NAMESPACE - valueFrom: - fieldRef: - fieldPath: metadata.namespace - - name: KAFKA_ADVERTISED_LISTENERS - value: "LISTENER_DOCKER_EXTERNAL_LOCALHOST://localhost:29092, LISTENER_DOCKER_EXTERNAL_DIFFHOST://{{.Release.Name}}-mini-runtime.{{.Release.Namespace}}.svc.cluster.local:9092" - - name: KAFKA_BROKER_ID - value: {{ quote .Values.mini_runtime.kafka1.env.kafkaBrokerId }} - - name: KAFKA_CLEANUP_POLICY - value: {{ quote .Values.mini_runtime.kafka1.env.kafkaCleanupPolicy }} - - name: KAFKA_CREATE_TOPICS - value: {{ quote .Values.mini_runtime.kafka1.env.kafkaCreateTopics }} - - name: KAFKA_INTER_BROKER_LISTENER_NAME - value: {{ quote .Values.mini_runtime.kafka1.env.kafkaInterBrokerListenerName }} - - name: KAFKA_LISTENER_SECURITY_PROTOCOL_MAP - value: {{ quote .Values.mini_runtime.kafka1.env.kafkaListenerSecurityProtocolMap }} - - name: KAFKA_LOG_CLEANER_ENABLE - value: {{ quote .Values.mini_runtime.kafka1.env.kafkaLogCleanerEnable }} - - name: KAFKA_LOG_RETENTION_BYTES - value: {{ quote .Values.mini_runtime.kafka1.env.kafkaLogRetentionBytes }} - - name: KAFKA_LOG_RETENTION_CHECK_INTERVAL_MS - value: {{ quote .Values.mini_runtime.kafka1.env.kafkaLogRetentionCheckIntervalMs }} - - name: KAFKA_LOG_RETENTION_HOURS - value: {{ quote .Values.mini_runtime.kafka1.env.kafkaLogRetentionHours }} - - name: KAFKA_LOG_SEGMENT_BYTES - value: {{ quote .Values.mini_runtime.kafka1.env.kafkaLogSegmentBytes }} - - name: KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR - value: {{ quote .Values.mini_runtime.kafka1.env.kafkaOffsetsTopicReplicationFactor - }} - - name: KAFKA_TRANSACTION_STATE_LOG_MIN_ISR - value: {{ quote .Values.mini_runtime.kafka1.env.kafkaTransactionStateLogMinIsr }} - - name: KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR - value: {{ quote .Values.mini_runtime.kafka1.env.kafkaTransactionStateLogReplicationFactor - }} - - name: KAFKA_ZOOKEEPER_CONNECT - value: {{ quote .Values.mini_runtime.kafka1.env.kafkaZookeeperConnect }} - - name: KUBERNETES_CLUSTER_DOMAIN - value: {{ quote .Values.kubernetesClusterDomain }} - image: {{ .Values.mini_runtime.kafka1.image.repository }}:{{ .Values.mini_runtime.kafka1.image.tag - | default .Chart.AppVersion }} - name: kafka1 - ports: - - containerPort: 9092 - - containerPort: 19092 - - containerPort: 29092 - - containerPort: 9999 - resources: {{- toYaml .Values.mini_runtime.kafka1.resources | nindent 10 }} - restartPolicy: Always ---- {{ if .Values.keel.keel.enabled }} apiVersion: apps/v1 kind: Deployment diff --git a/charts/hybrid-redact/templates/hpa.yaml b/charts/hybrid-redact/templates/hpa.yaml deleted file mode 100644 index a17fcdf..0000000 --- a/charts/hybrid-redact/templates/hpa.yaml +++ /dev/null @@ -1,14 +0,0 @@ -apiVersion: autoscaling/v1 -kind: HorizontalPodAutoscaler -metadata: - name: {{ include "akto.fullname" . }}-mini-runtime - labels: - {{- include "akto.labels" . | nindent 4 }} -spec: - maxReplicas: 5 - minReplicas: 1 - scaleTargetRef: - apiVersion: apps/v1 - kind: Deployment - name: {{ include "akto.fullname" . }}-mini-runtime - targetCPUUtilizationPercentage: 80 \ No newline at end of file diff --git a/charts/hybrid-redact/templates/mini-runtime.yaml b/charts/hybrid-redact/templates/mini-runtime.yaml deleted file mode 100644 index 609e8c7..0000000 --- a/charts/hybrid-redact/templates/mini-runtime.yaml +++ /dev/null @@ -1,13 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: {{ include "akto.fullname" . }}-mini-runtime - labels: - {{- include "akto.labels" . | nindent 4 }} -spec: - type: {{ .Values.mini_runtime.type }} - selector: - app: {{ include "akto.fullname" . }}-mini-runtime - {{- include "akto.selectorLabels" . | nindent 4 }} - ports: - {{- .Values.mini_runtime.ports | toYaml | nindent 2 -}} \ No newline at end of file diff --git a/charts/hybrid-redact/values.yaml b/charts/hybrid-redact/values.yaml index 50a8943..e0bc676 100644 --- a/charts/hybrid-redact/values.yaml +++ b/charts/hybrid-redact/values.yaml @@ -95,7 +95,7 @@ testing: databaseAbstractorUrl: https://cyborg.akto.io image: repository: public.ecr.aws/aktosecurity/akto-api-security-mini-testing - tag: 1.41.18_local + tag: local resources: requests: cpu: "200m"