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

[feature request] Add a default mssql provisioner #66

Closed
mathieu-benoit opened this issue Oct 18, 2024 · 0 comments · Fixed by #73
Closed

[feature request] Add a default mssql provisioner #66

mathieu-benoit opened this issue Oct 18, 2024 · 0 comments · Fixed by #73
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@mathieu-benoit
Copy link
Contributor

mathieu-benoit commented Oct 18, 2024

Let's add a default mssql provisioner, with outputs:

  • connection

For reference:

Not tested, but this could be a good starting point:

apiVersion: apps/v1
kind: Deployment
metadata:
  name: mssql-deployment
spec:
  replicas: 1
  selector:
    matchLabels:
      app: mssql
  template:
    metadata:
      labels:
        app: mssql
    spec:
      containers:
      - name: mssql
        image: mcr.microsoft.com/mssql/server:2022-latest
        env:
        - name: MSSQL_PID
          value: "Developer"
        - name: ACCEPT_EULA
          value: "Y"
        - name: MSSQL_SA_PASSWORD
          valueFrom:
            secretKeyRef:
              name: mssql-secret
              key: SA_PASSWORD 
        volumeMounts:
        - name: mssqldb
          mountPath: /var/opt/mssql
      volumes:
      - name: mssqldb
        persistentVolumeClaim:
          claimName: mssql-data
apiVersion: v1
kind: Service
metadata:
  name: mssql-service
spec:
  selector:
    app: mssql
  ports:
    - protocol: TCP
      port: 1433
      targetPort: 1433
  type: ClusterIP
apiVersion: v1
kind: Secret
metadata:
  name: mssql-secret
data:
  SA_PASSWORD: FIXME_TO_GENERATE_IN_PROVISIONER
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
  name: mssql-data
spec:
  accessModes:
  - ReadWriteOnce
  resources:
    requests:
      storage: 2Gi

Need to be adapted and tested, file to update https://github.com/score-spec/score-k8s/blob/main/internal/provisioners/default/zz-default.provisioners.yaml.

@mathieu-benoit mathieu-benoit added enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed labels Oct 18, 2024
@mathieu-benoit mathieu-benoit linked a pull request Oct 24, 2024 that will close this issue
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant