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

x509 auth needs to go through nginx load balancer #117

Open
npmaile opened this issue Mar 24, 2020 · 0 comments
Open

x509 auth needs to go through nginx load balancer #117

npmaile opened this issue Mar 24, 2020 · 0 comments

Comments

@npmaile
Copy link
Contributor

npmaile commented Mar 24, 2020

at some point code that looks roughly like this needs to be deployed to get nginx load balancing in front of the x509


echo "Creating Gate x509 API Service for deployment named sandbox-us-central1"
cat <<SVC_EOF | kubectl --kubeconfig="/spinnaker/.kube/sandbox-us-central1.config" apply -f -
apiVersion: v1
kind: Service
metadata:
  labels:
    app: spin
    cluster: spin-gate
  name: spin-gate-spin-api
  namespace: spinnaker
spec:
  ports:
  - name: x509
    port: 8085
    protocol: TCP
    targetPort: 8085
  selector:
    app: spin
    cluster: spin-gate
  type: ClusterIP
SVC_EOF

echo "Creating Gate x509 API Ingress for deployment named sandbox-us-central1"
cat <<ING_EOF | kubectl --kubeconfig="/spinnaker/.kube/sandbox-us-central1.config" apply -f -
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  annotations:
    kubernetes.io/ingress.class: nginx
    nginx.ingress.kubernetes.io/backend-protocol: HTTPS
    nginx.ingress.kubernetes.io/ssl-passthrough: "true"
    nginx.ingress.kubernetes.io/ssl-redirect: "true"
  labels:
    app: spin
    cluster: spin-gate
  name: spin-gate-spin-api
  namespace: spinnaker
spec:
  rules:
  - host: spin-api.spinnaker.example.com
    http:
      paths:
      - backend:
          serviceName: spin-gate-spin-api
          servicePort: 8085
        path: /
  tls:
  - hosts:
    - spin-api.spinnaker.example.com
ING_EOF

thanks to @dmrogers7 for finding the code that will do it.

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

No branches or pull requests

1 participant