Skip to content
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

Add backend service #33

Closed

Conversation

AnchorArray
Copy link
Contributor

@AnchorArray AnchorArray commented Aug 21, 2024

helm template command output

---
# Source: guardrails/templates/serviceaccount.yaml
apiVersion: v1
kind: ServiceAccount
metadata:
  name: guardrails
  labels:
    helm.sh/chart: guardrails-0.3.0
    app.kubernetes.io/name: guardrails
    app.kubernetes.io/instance: guardrails
    app.kubernetes.io/version: "1.0.23"
    app.kubernetes.io/managed-by: Helm
automountServiceAccountToken: true
---
# Source: guardrails/templates/service-backend.yaml
apiVersion: v1
kind: Service
metadata:
  name: guardrails-backend
  labels:
    helm.sh/chart: guardrails-0.3.0
    app.kubernetes.io/name: guardrails
    app.kubernetes.io/instance: guardrails-backend
    app.kubernetes.io/version: "1.0.23"
    app.kubernetes.io/managed-by: Helm
spec:
  type: ClusterIP
  ports:
    - name: http
      protocol: TCP
      port: 80
      targetPort: 8080
  selector:
    app.kubernetes.io/name: guardrails
    app.kubernetes.io/instance: guardrails-backend
---
# Source: guardrails/templates/service.yaml
apiVersion: v1
kind: Service
metadata:
  name: guardrails
  labels:
    helm.sh/chart: guardrails-0.3.0
    app.kubernetes.io/name: guardrails
    app.kubernetes.io/instance: guardrails
    app.kubernetes.io/version: "1.0.23"
    app.kubernetes.io/managed-by: Helm
spec:
  type: ClusterIP
  ports:
    - name: http
      protocol: TCP
      port: 80
      targetPort: 8000
  selector:
    app.kubernetes.io/name: guardrails
    app.kubernetes.io/instance: guardrails
---
# Source: guardrails/templates/deployment-backend.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: guardrails-backend
  labels:
    helm.sh/chart: guardrails-0.3.0
    app.kubernetes.io/name: guardrails
    app.kubernetes.io/instance: guardrails-backend
    app.kubernetes.io/version: "1.0.23"
    app.kubernetes.io/managed-by: Helm
spec:
  revisionHistoryLimit: 3
  replicas: 1
  selector:
    matchLabels:
      app.kubernetes.io/name: guardrails
      app.kubernetes.io/instance: guardrails-backend
  template:
    metadata:
      labels:
        helm.sh/chart: guardrails-0.3.0
        app.kubernetes.io/name: guardrails
        app.kubernetes.io/instance: guardrails-backend
        app.kubernetes.io/version: "1.0.23"
        app.kubernetes.io/managed-by: Helm
    spec:
      imagePullSecrets:
        - name: whylabs-guardrails-registry-credentials
      serviceAccountName: guardrails
      securityContext:
        runAsNonRoot: true
      containers:
        - name: guardrails
          securityContext:
            allowPrivilegeEscalation: false
            capabilities:
              drop:
                - ALL
            privileged: false
            readOnlyRootFilesystem: true
            runAsNonRoot: true
            runAsUser: 1000
          image: "207285235248.dkr.ecr.us-west-2.amazonaws.com/guardrails-backend:latest"
          imagePullPolicy: IfNotPresent
          ports:
            - name: http
              containerPort: 8080
              protocol: TCP
          livenessProbe:
            failureThreshold: 3
            httpGet:
              path: /status
              port: 8080
            initialDelaySeconds: 30
            periodSeconds: 30
          readinessProbe:
            failureThreshold: 10
            httpGet:
              path: /status
              port: 8080
            initialDelaySeconds: 30
            periodSeconds: 30
          resources:
            limits:
              cpu: "1"
              ephemeral-storage: 250Mi
              memory: 1Gi
            requests:
              cpu: "1"
              ephemeral-storage: 250Mi
              memory: 1Gi
          volumeMounts:
            - name: temp-dir
              mountPath: /tmp
      volumes:
        - name: temp-dir
          emptyDir: {}
---
# Source: guardrails/templates/deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: guardrails
  labels:
    helm.sh/chart: guardrails-0.3.0
    app.kubernetes.io/name: guardrails
    app.kubernetes.io/instance: guardrails
    app.kubernetes.io/version: "1.0.23"
    app.kubernetes.io/managed-by: Helm
spec:
  revisionHistoryLimit: 3
  replicas: 4
  selector:
    matchLabels:
      app.kubernetes.io/name: guardrails
      app.kubernetes.io/instance: guardrails
  template:
    metadata:
      labels:
        helm.sh/chart: guardrails-0.3.0
        app.kubernetes.io/name: guardrails
        app.kubernetes.io/instance: guardrails
        app.kubernetes.io/version: "1.0.23"
        app.kubernetes.io/managed-by: Helm
    spec:
      imagePullSecrets:
        - name: whylabs-guardrails-registry-credentials
      serviceAccountName: guardrails
      securityContext:
        runAsNonRoot: true
      containers:
        - name: guardrails
          securityContext:
            allowPrivilegeEscalation: false
            capabilities:
              drop:
                - ALL
            privileged: false
            readOnlyRootFilesystem: true
            runAsNonRoot: true
            runAsUser: 1000
          image: "207285235248.dkr.ecr.us-west-2.amazonaws.com/guardrails:1.0.23"
          imagePullPolicy: IfNotPresent
          envFrom:
            - secretRef:
                name: whylabs-guardrails-api-key
            - secretRef:
                name: whylabs-guardrails-api-secret
          ports:
            - name: http
              containerPort: 8000
              protocol: TCP
          livenessProbe:
            failureThreshold: 3
            httpGet:
              path: /health
              port: 8000
            initialDelaySeconds: 30
            periodSeconds: 30
          readinessProbe:
            failureThreshold: 10
            httpGet:
              path: /health
              port: 8000
            initialDelaySeconds: 30
            periodSeconds: 30
          resources:
            limits:
              cpu: "4"
              ephemeral-storage: 250Mi
              memory: 4Gi
            requests:
              cpu: "4"
              ephemeral-storage: 250Mi
              memory: 4Gi
          volumeMounts:
            - name: temp-dir
              mountPath: /tmp
      volumes:
        - name: temp-dir
          emptyDir: {}

@AnchorArray AnchorArray self-assigned this Aug 21, 2024
@AnchorArray AnchorArray marked this pull request as draft August 21, 2024 20:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant