This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def convert_to_snake_case(pascal_cased_string): | |
# snake_cased_char_list = [pascal_cased_string[0].lower()] | |
# for char in pascal_cased_string[1:]: | |
# if char.isupper(): | |
# snake_cased_char_list.append(f'_{char.lower()}') | |
# else: | |
# snake_cased_char_list.append(char) | |
snake_cased_char_list = [f'_{char.lower()}' if char.isupper() else char for char in pascal_cased_string] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: getambassador.io/v3alpha1 | |
kind: Mapping | |
metadata: | |
name: front-end-mapping | |
spec: | |
prefix: "/?(.*)" | |
prefix_regex: true | |
service: http://client-cluster-ip-service:8080 | |
--- | |
apiVersion: getambassador.io/v3alpha1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: getambassador.io/v3alpha1 | |
kind: Listener | |
metadata: | |
name: emissary-listener | |
spec: | |
port: 80 | |
protocol: HTTP | |
securityModel: INSECURE | |
hostBinding: | |
selector: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: api-load-balancer-service | |
spec: | |
type: LoadBalancer | |
selector: | |
component: api | |
ports: | |
- port: 3000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: api-node-port-service | |
spec: | |
type: NodePort | |
selector: | |
component: api | |
ports: | |
- port: 3000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: postgres-deployment | |
spec: | |
replicas: 1 | |
selector: | |
matchLabels: | |
component: postgres | |
template: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: postgres-cluster-ip-service | |
spec: | |
type: ClusterIP | |
selector: | |
component: postgres | |
ports: | |
- port: 5432 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: api-deployment | |
spec: | |
replicas: 3 | |
selector: | |
matchLabels: | |
component: api | |
template: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: v1 | |
kind: Pod | |
metadata: | |
name: hello-kube-pod | |
labels: | |
component: web | |
spec: | |
containers: | |
- name: hello-kube | |
image: fhsinchy/hello-kube |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## /notes-api/docker-compose.yaml | |
version: "3.8" | |
services: | |
db: | |
image: postgres:12 | |
volumes: | |
- db-data:/var/lib/postgresql/data | |
environment: |
NewerOlder