Skip to content

Add Istio mTLS injection to Hub #352

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 55 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
7b2d8af
add istio-injection label to ml resources
aaronreynoza Aug 29, 2024
d30b337
fix labels
aaronreynoza Aug 29, 2024
f56d29d
revert unneded changes
aaronreynoza Aug 29, 2024
6f1d2df
change
aaronreynoza Aug 29, 2024
e669d4f
enable istio injection without validation
aaronreynoza Aug 29, 2024
353920f
start istio segmentation
aaronreynoza Aug 29, 2024
d4b78c6
add istio-injection label to statefulset resources
aaronreynoza Sep 2, 2024
8beb77a
make istio injection default variable as true
aaronreynoza Sep 2, 2024
deafa42
test
aaronreynoza Sep 2, 2024
f79ffcc
add ref to istio files from ml templates
aaronreynoza Sep 2, 2024
a6886a2
revert moja istio changes
aaronreynoza Sep 2, 2024
86f55db
add more labels
aaronreynoza Sep 4, 2024
c8bc2f9
add namespace wide injection test
aaronreynoza Sep 6, 2024
b608aa6
enable mTLS peerAuthentication for hub
aaronreynoza Sep 6, 2024
36f27ce
fix EOF
aaronreynoza Sep 6, 2024
b165dca
remove EOF
aaronreynoza Sep 6, 2024
d8ece6c
change to v1beta1
aaronreynoza Sep 9, 2024
93308fd
fix to correct namespace
aaronreynoza Sep 9, 2024
bab425f
hardcode mcm ns name
aaronreynoza Sep 9, 2024
486ef6b
add authorization policies for namespaces
aaronreynoza Sep 10, 2024
da060c8
fix authorization policy
aaronreynoza Sep 10, 2024
3709562
switch to permissive AP and disable istio in mysql kafka
aaronreynoza Sep 10, 2024
1b085af
fix lint
aaronreynoza Sep 10, 2024
38ffcf3
add istio-injection disabled to mysql
aaronreynoza Sep 10, 2024
060e10c
add mysql label to disable istio-injection
aaronreynoza Sep 10, 2024
e5db345
fix boolean
aaronreynoza Sep 10, 2024
8a0b3bc
add more labels
aaronreynoza Sep 10, 2024
b14c01d
disable istio injection
aaronreynoza Sep 10, 2024
cab2142
only inject istio in mojaloop and mcm
aaronreynoza Sep 10, 2024
60948bd
fix label
aaronreynoza Sep 10, 2024
5d76f4d
if statement label
aaronreynoza Sep 10, 2024
1fb62b9
go monkey
aaronreynoza Sep 10, 2024
96116c1
learning tpl, one commit at a time
aaronreynoza Sep 10, 2024
399de79
indenting
aaronreynoza Sep 10, 2024
e74f3c3
change labels
aaronreynoza Sep 10, 2024
860d317
change labels
aaronreynoza Sep 10, 2024
8942064
remove failed spec
aaronreynoza Sep 10, 2024
1a0feed
remove istio from mongo and redis
aaronreynoza Sep 11, 2024
e3c6326
fix labels
aaronreynoza Sep 11, 2024
c1667b2
fix typo again
aaronreynoza Sep 11, 2024
49588f7
remove label
aaronreynoza Sep 12, 2024
eb0b0d4
remove more labels
aaronreynoza Sep 12, 2024
a7a84bb
fix labels
aaronreynoza Sep 12, 2024
00f25f8
labels should be strings aparently
aaronreynoza Sep 12, 2024
e612460
disable sim injection
aaronreynoza Sep 12, 2024
146a033
add cacheLabels to mojaSims
aaronreynoza Sep 12, 2024
db6e7cd
remove authorizationpolicies
aaronreynoza Sep 12, 2024
11c5e12
disable vault init in connection manager
aaronreynoza Sep 13, 2024
e92b1f4
remove duplicate
aaronreynoza Sep 13, 2024
57c623f
clean leftover code
aaronreynoza Sep 13, 2024
a77b954
readd missing AP
aaronreynoza Sep 13, 2024
dde2f6e
restore missing labels
aaronreynoza Sep 13, 2024
943ee4d
Merge branch 'main' of github.com:mojaloop/iac-modules into cto-18
aaronreynoza Dec 16, 2024
2be322c
add logical operator validation
aaronreynoza Dec 16, 2024
0462eb6
Refactor namespace handling for mTLS-enabled namespaces
KhaledSaiidi Dec 16, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
add istio-injection label to ml resources
  • Loading branch information
aaronreynoza committed Aug 29, 2024
commit 7b2d8afb5cb5a415188036c5d01a6ccc0b2a42cc
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,15 @@ spec:
server: https://kubernetes.default.svc
project: default
syncPolicy:
# %{ if opentelemetry_namespace_filtering_enable }
managedNamespaceMetadata:
%{ if istio_create_ingress_gateways ~}
labels:
istio-injection: enabled
%{ endif ~}
%{ if opentelemetry_namespace_filtering_enable ~}
annotations:
instrumentation.opentelemetry.io/inject-nodejs: "true"
# %{ endif }
%{ endif ~}
automated:
prune: true
selfHeal: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ account-lookup-service:
podLabels:
sidecar.istio.io/inject: "${enable_istio_injection}"
replicaCount: ${account_lookup_service_replica_count}
config: &ALS_CONFIG
config:
hub_participant: *HUB_PARTICIPANT
kafka_host: *KAFKA_HOST
kafka_port: *KAFKA_PORT
Expand Down Expand Up @@ -196,7 +196,31 @@ account-lookup-service:
# %{ endif }
tolerations: *MOJALOOP_TOLERATIONS
replicaCount: ${account_lookup_service_admin_replica_count}
config: *ALS_CONFIG
config:
hub_participant: *HUB_PARTICIPANT
kafka_host: *KAFKA_HOST
kafka_port: *KAFKA_PORT
db_password: *ALS_DB_PASSWORD
db_secret: *ALS_DB_SECRET
db_host: *ALS_DB_HOST
db_user: *ALS_DB_USER
db_port: *ALS_DB_PORT
db_database: *ALS_DB_DATABASE
endpointSecurity: *ENDPOINT_SECURITY
# Thirdparty API Config
featureEnableExtendedPartyIdType: ${mojaloop_thirdparty_support_enabled}
central_shared_end_point_cache:
expiresIn: 180000
generateTimeout: 30000
getDecoratedValue: true
central_shared_participant_cache:
expiresIn: 61000
generateTimeout: 30000
getDecoratedValue: true
general_cache:
enabled: true
maxByteSize: 10000000
expiresIn: 61000
ingress:
# %{ if istio_create_ingress_gateways }
enabled: false
Expand All @@ -210,25 +234,6 @@ account-lookup-service:
prefix: *ALS_MONITORING_PREFIX
als-oracle-pathfinder:
enabled: false
account-lookup-service-handler-timeout:
# %{ if account_lookup_admin_service_affinity != null }
affinity:
${indent(8, account_lookup_admin_service_affinity)}
# %{ endif }
tolerations: *MOJALOOP_TOLERATIONS
replicaCount: 1 # timeout handler is designed to run as a single instance
config: *ALS_CONFIG
ingress:
# %{ if istio_create_ingress_gateways }
enabled: false
# %{ else }
enabled: true
# %{ endif }
className: *INGRESS_CLASS
hostname: account-lookup-service-timeout.${ingress_subdomain}
metrics:
config:
prefix: *ALS_MONITORING_PREFIX

quoting-service:
quoting-service:
Expand Down Expand Up @@ -312,6 +317,8 @@ ml-api-adapter:
# %{ endif }
tolerations: *MOJALOOP_TOLERATIONS
replicaCount: ${ml_api_adapter_service_replica_count}
podLabels:
sidecar.istio.io/inject: "${enable_istio_injection}"
config:
hub_participant: *HUB_PARTICIPANT
kafka_host: *KAFKA_HOST
Expand Down Expand Up @@ -363,6 +370,8 @@ centralledger:
affinity:
${indent(8, centralledger_service_affinity)}
# %{ endif }
podLabels:
sidecar.istio.io/inject: "${enable_istio_injection}"
tolerations: *MOJALOOP_TOLERATIONS
replicaCount: ${central_ledger_service_replica_count}
config:
Expand Down Expand Up @@ -396,6 +405,8 @@ centralledger:
affinity:
${indent(8, central_ledger_handler_transfer_prepare_affinity)}
# %{ endif }
podLabels:
sidecar.istio.io/inject: "${enable_istio_injection}"
tolerations: *MOJALOOP_TOLERATIONS
replicaCount: ${central_ledger_handler_transfer_prepare_replica_count}
config:
Expand Down Expand Up @@ -427,6 +438,8 @@ centralledger:
affinity:
${indent(8, central_ledger_handler_transfer_position_affinity)}
# %{ endif }
podLabels:
sidecar.istio.io/inject: "${enable_istio_injection}"
tolerations: *MOJALOOP_TOLERATIONS
replicaCount: ${central_ledger_handler_transfer_position_replica_count}
config:
Expand Down Expand Up @@ -460,6 +473,8 @@ centralledger:
# %{ endif }
tolerations: *MOJALOOP_TOLERATIONS
replicaCount: ${central_ledger_handler_transfer_position_batch_replica_count}
podLabels:
sidecar.istio.io/inject: "${enable_istio_injection}"
config:
hub_participant: *HUB_PARTICIPANT
kafka_host: *KAFKA_HOST
Expand Down Expand Up @@ -490,6 +505,8 @@ centralledger:
affinity:
${indent(8, central_ledger_handler_transfer_get_affinity)}
# %{ endif }
podLabels:
sidecar.istio.io/inject: "${enable_istio_injection}"
tolerations: *MOJALOOP_TOLERATIONS
replicaCount: ${central_ledger_handler_transfer_get_replica_count}
config:
Expand Down Expand Up @@ -520,6 +537,8 @@ centralledger:
affinity:
${indent(8, central_ledger_handler_transfer_fulfil_affinity)}
# %{ endif }
podLabels:
sidecar.istio.io/inject: "${enable_istio_injection}"
tolerations: *MOJALOOP_TOLERATIONS
replicaCount: ${central_ledger_handler_transfer_fulfil_replica_count}
config:
Expand Down Expand Up @@ -548,6 +567,8 @@ centralledger:
prefix: *CL_MONITORING_PREFIX
centralledger-handler-timeout:
tolerations: *MOJALOOP_TOLERATIONS
podLabels:
sidecar.istio.io/inject: "${enable_istio_injection}"
config:
hub_participant: *HUB_PARTICIPANT
kafka_host: *KAFKA_HOST
Expand Down Expand Up @@ -579,6 +600,8 @@ centralledger:
# %{ endif }
tolerations: *MOJALOOP_TOLERATIONS
replicaCount: ${central_ledger_handler_admin_transfer_replica_count}
podLabels:
sidecar.istio.io/inject: "${enable_istio_injection}"
config:
hub_participant: *HUB_PARTICIPANT
kafka_host: *KAFKA_HOST
Expand Down Expand Up @@ -619,6 +642,8 @@ centralsettlement:
affinity:
${indent(8, central_settlement_service_affinity)}
# %{ endif }
podLabels:
sidecar.istio.io/inject: "${enable_istio_injection}"
tolerations: *MOJALOOP_TOLERATIONS
replicaCount: ${central_settlement_service_replica_count}
config:
Expand All @@ -636,6 +661,8 @@ centralsettlement:
affinity:
${indent(8, central_settlement_handler_deferredsettlement_affinity)}
# %{ endif }
podLabels:
sidecar.istio.io/inject: "${enable_istio_injection}"
tolerations: *MOJALOOP_TOLERATIONS
replicaCount: ${central_settlement_handler_deferredsettlement_replica_count}
config:
Expand All @@ -653,6 +680,8 @@ centralsettlement:
affinity:
${indent(8, central_settlement_handler_grosssettlement_affinity)}
# %{ endif }
podLabels:
sidecar.istio.io/inject: "${enable_istio_injection}"
tolerations: *MOJALOOP_TOLERATIONS
replicaCount: ${central_settlement_handler_grosssettlement_replica_count}
config:
Expand All @@ -670,6 +699,8 @@ centralsettlement:
affinity:
${indent(8, central_settlement_handler_rules_affinity)}
# %{ endif }
podLabels:
sidecar.istio.io/inject: "${enable_istio_injection}"
tolerations: *MOJALOOP_TOLERATIONS
replicaCount: ${central_settlement_handler_rules_replica_count}
config:
Expand Down Expand Up @@ -732,6 +763,8 @@ thirdparty:

consent-oracle:
enabled: true
podLabels:
sidecar.istio.io/inject: "${enable_istio_injection}"
tolerations: *MOJALOOP_TOLERATIONS
replicaCount: ${consent_oracle_replica_count}
config:
Expand Down Expand Up @@ -772,6 +805,8 @@ thirdparty:
tolerations: *MOJALOOP_TOLERATIONS

simulator:
podLabels:
sidecar.istio.io/inject: "${enable_istio_injection}"
tolerations: *MOJALOOP_TOLERATIONS
ingress:
# %{ if istio_create_ingress_gateways }
Expand All @@ -786,6 +821,8 @@ mojaloop-bulk:
enabled: ${bulk_enabled}
bulk-api-adapter:
bulk-api-adapter-service:
podLabels:
sidecar.istio.io/inject: "${enable_istio_injection}"
tolerations: *MOJALOOP_TOLERATIONS
replicaCount: ${bulk_api-adapter_service_replica_count}
config:
Expand Down Expand Up @@ -826,6 +863,8 @@ mojaloop-bulk:
endpointSecurity: *ENDPOINT_SECURITY
bulk-centralledger:
cl-handler-bulk-transfer-prepare:
podLabels:
sidecar.istio.io/inject: "${enable_istio_injection}"
tolerations: *MOJALOOP_TOLERATIONS
replicaCount: ${cl_handler_bulk_transfer_prepare_replica_count}
config:
Expand All @@ -845,6 +884,8 @@ mojaloop-bulk:
mongo_secret: *OBJSTORE_MONGO_SECRET
mongo_database: *OBJSTORE_MONGO_DATABASE
cl-handler-bulk-transfer-fulfil:
podLabels:
sidecar.istio.io/inject: "${enable_istio_injection}"
tolerations: *MOJALOOP_TOLERATIONS
replicaCount: ${cl_handler_bulk_transfer_fulfil_replica_count}
config:
Expand All @@ -864,6 +905,8 @@ mojaloop-bulk:
mongo_secret: *OBJSTORE_MONGO_SECRET
mongo_database: *OBJSTORE_MONGO_DATABASE
cl-handler-bulk-transfer-processing:
podLabels:
sidecar.istio.io/inject: "${enable_istio_injection}"
tolerations: *MOJALOOP_TOLERATIONS
replicaCount: ${cl_handler_bulk_transfer_processing_replica_count}
config:
Expand All @@ -883,6 +926,8 @@ mojaloop-bulk:
mongo_secret: *OBJSTORE_MONGO_SECRET
mongo_database: *OBJSTORE_MONGO_DATABASE
cl-handler-bulk-transfer-get:
podLabels:
sidecar.istio.io/inject: "${enable_istio_injection}"
tolerations: *MOJALOOP_TOLERATIONS
replicaCount: ${cl_handler_bulk_transfer_get_replica_count}
config:
Expand All @@ -909,6 +954,8 @@ mojaloop-ttk-simulators:
enabled: true
sdk-scheme-adapter: &MOJA_TTK_SIM_SDK
sdk-scheme-adapter-api-svc:
podLabels:
sidecar.istio.io/inject: "${enable_istio_injection}"
tolerations: *MOJALOOP_TOLERATIONS
ingress:
enabled: false
Expand Down Expand Up @@ -943,6 +990,8 @@ mojaloop-ttk-simulators:
ml-testing-toolkit:
ml-testing-toolkit-backend:
tolerations: *MOJALOOP_TOLERATIONS
podLabels:
sidecar.istio.io/inject: "${enable_istio_injection}"
ingress:
enabled: false
hosts:
Expand Down Expand Up @@ -977,6 +1026,8 @@ mojaloop-ttk-simulators:
database: *TTK_MONGO_DATABASE

ml-testing-toolkit-frontend:
podLabels:
sidecar.istio.io/inject: "${enable_istio_injection}"
tolerations: *MOJALOOP_TOLERATIONS
ingress:
enabled: false
Expand All @@ -991,6 +1042,8 @@ mojaloop-ttk-simulators:
sdk-scheme-adapter: *MOJA_TTK_SIM_SDK
ml-testing-toolkit:
ml-testing-toolkit-backend:
podLabels:
sidecar.istio.io/inject: "${enable_istio_injection}"
tolerations: *MOJALOOP_TOLERATIONS
ingress:
enabled: false
Expand All @@ -1001,6 +1054,8 @@ mojaloop-ttk-simulators:
host: ttksim2.${ingress_subdomain}

ml-testing-toolkit-frontend:
podLabels:
sidecar.istio.io/inject: "${enable_istio_injection}"
tolerations: *MOJALOOP_TOLERATIONS
ingress:
enabled: false
Expand All @@ -1015,6 +1070,8 @@ mojaloop-ttk-simulators:
sdk-scheme-adapter: *MOJA_TTK_SIM_SDK
ml-testing-toolkit:
ml-testing-toolkit-backend:
podLabels:
sidecar.istio.io/inject: "${enable_istio_injection}"
tolerations: *MOJALOOP_TOLERATIONS
ingress:
enabled: false
Expand All @@ -1026,6 +1083,8 @@ mojaloop-ttk-simulators:

ml-testing-toolkit-frontend:
tolerations: *MOJALOOP_TOLERATIONS
podLabels:
sidecar.istio.io/inject: "${enable_istio_injection}"
ingress:
enabled: false
hosts:
Expand All @@ -1037,6 +1096,8 @@ mojaloop-ttk-simulators:
ml-testing-toolkit:
enabled: ${internal_ttk_enabled}
ml-testing-toolkit-backend:
podLabels:
sidecar.istio.io/inject: "${enable_istio_injection}"
tolerations: *MOJALOOP_TOLERATIONS
config:
mongodb:
Expand Down Expand Up @@ -1168,6 +1229,8 @@ ml-testing-toolkit:
expectedAuthorizationsVersion: "1.1"
expectedTransactionRequestsVersion: "1.1"
ml-testing-toolkit-frontend:
podLabels:
sidecar.istio.io/inject: "${enable_istio_injection}"
tolerations: *MOJALOOP_TOLERATIONS
ingress:
# %{ if istio_create_ingress_gateways }
Expand Down Expand Up @@ -1204,6 +1267,8 @@ ml-ttk-test-setup:
## Set the TTL for Job Cleanup - ref: https://kubernetes.io/docs/concepts/workloads/controllers/ttlafterfinished/
# ttlSecondsAfterFinished: 50
generateNameEnabled: false
labels:
sidecar.istio.io/inject: "${enable_istio_injection}"
annotations:
argocd.argoproj.io/hook: PostSync

Expand All @@ -1229,6 +1294,8 @@ ml-ttk-test-val-gp:
## Set the TTL for Job Cleanup - ref: https://kubernetes.io/docs/concepts/workloads/controllers/ttlafterfinished/
# ttlSecondsAfterFinished: 50
generateNameEnabled: false
labels:
sidecar.istio.io/inject: "${enable_istio_injection}"
annotations:
argocd.argoproj.io/hook: PostSync
argocd.argoproj.io/sync-wave: "${mojaloop_test_sync_wave}"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
%{ for ns in stateful_resources_operators_ns ~}
%{ for ns in all_ns ~}
apiVersion: v1
kind: Namespace
metadata:
name: ${ns}
%{ if istio_create_ingress_gateways ~}
labels:
istio-injection: enabled
%{ endif ~}
---
%{ endfor ~}