diff --git a/README.md b/README.md index eb7dcfc..f5e7852 100644 --- a/README.md +++ b/README.md @@ -29,8 +29,10 @@ https://developer.ibm.com/tutorials/deploy-a-hello-world-application-on-kubernet https://github.com/tektoncd/pipeline/blob/master/docs/tutorial.md +https://github.com/tektoncd/pipeline/blob/master/docs/install.md + install tekton kubectl apply --filename https://storage.googleapis.com/tekton-releases/latest/release.yaml - +docker config is een configmap gemaakt van config.json wa base64 username:pass inhoud heeft erges diff --git a/hello/Chart.yaml b/hello/Chart.yaml new file mode 100644 index 0000000..152ab1c --- /dev/null +++ b/hello/Chart.yaml @@ -0,0 +1,21 @@ +apiVersion: v2 +name: hello +description: A Helm chart for Kubernetes + +# A chart can be either an 'application' or a 'library' chart. +# +# Application charts are a collection of templates that can be packaged into versioned archives +# to be deployed. +# +# Library charts provide useful utilities or functions for the chart developer. They're included as +# a dependency of application charts to inject those utilities and functions into the rendering +# pipeline. Library charts do not define any templates and therefore cannot be deployed. +type: application + +# This is the chart version. This version number should be incremented each time you make changes +# to the chart and its templates, including the app version. +version: 0.1.0 + +# This is the version number of the application being deployed. This version number should be +# incremented each time you make changes to the application. +appVersion: 1.16.0 diff --git a/hello/templates/pod-server-a.yaml b/hello/templates/pod-server-a.yaml new file mode 100644 index 0000000..019ee36 --- /dev/null +++ b/hello/templates/pod-server-a.yaml @@ -0,0 +1,14 @@ +apiVersion: v1 +kind: Pod +metadata: + name: server-a + labels: + server: "http" + expose: "true" +spec: + containers: + - name: front-end + image: IMAGE-A + ports: + - containerPort: 5000 + diff --git a/hello/templates/pod-server-b.yaml b/hello/templates/pod-server-b.yaml new file mode 100644 index 0000000..f2d2537 --- /dev/null +++ b/hello/templates/pod-server-b.yaml @@ -0,0 +1,12 @@ +apiVersion: v1 +kind: Pod +metadata: + name: server-b + labels: + server: "http" +spec: + containers: + - name: front-end + image: IMAGE-B + ports: + - containerPort: 5000 \ No newline at end of file diff --git a/hello/templates/service-expose.yaml b/hello/templates/service-expose.yaml new file mode 100644 index 0000000..86a092f --- /dev/null +++ b/hello/templates/service-expose.yaml @@ -0,0 +1,14 @@ +kind: Service +apiVersion: v1 +metadata: + name: expose-server +spec: + type: NodePort + selector: + expose: "true" + ports: + - name: http + protocol: TCP + targetPort: 5000 + port: 5000 + nodePort: 30036 \ No newline at end of file diff --git a/hello/templates/service.yaml b/hello/templates/service.yaml new file mode 100644 index 0000000..1b41fb3 --- /dev/null +++ b/hello/templates/service.yaml @@ -0,0 +1,11 @@ +kind: Service +apiVersion: v1 +metadata: + name: server-check +spec: + selector: + server: "http" + ports: + - name: http + protocol: TCP + port: 5000 diff --git a/hello/values.yaml b/hello/values.yaml new file mode 100644 index 0000000..7992a96 --- /dev/null +++ b/hello/values.yaml @@ -0,0 +1,68 @@ +# Default values for hello. +# This is a YAML-formatted file. +# Declare variables to be passed into your templates. + +replicaCount: 1 + +image: + repository: nginx + pullPolicy: IfNotPresent + +imagePullSecrets: [] +nameOverride: "" +fullnameOverride: "" + +serviceAccount: + # Specifies whether a service account should be created + create: true + # Annotations to add to the service account + annotations: {} + # The name of the service account to use. + # If not set and create is true, a name is generated using the fullname template + name: + +podSecurityContext: {} + # fsGroup: 2000 + +securityContext: {} + # capabilities: + # drop: + # - ALL + # readOnlyRootFilesystem: true + # runAsNonRoot: true + # runAsUser: 1000 + +service: + type: ClusterIP + port: 80 + +ingress: + enabled: false + annotations: {} + # kubernetes.io/ingress.class: nginx + # kubernetes.io/tls-acme: "true" + hosts: + - host: chart-example.local + paths: [] + tls: [] + # - secretName: chart-example-tls + # hosts: + # - chart-example.local + +resources: {} + # We usually recommend not to specify default resources and to leave this as a conscious + # choice for the user. This also increases chances charts run on environments with little + # resources, such as Minikube. If you do want to specify resources, uncomment the following + # lines, adjust them as necessary, and remove the curly braces after 'resources:'. + # limits: + # cpu: 100m + # memory: 128Mi + # requests: + # cpu: 100m + # memory: 128Mi + +nodeSelector: {} + +tolerations: [] + +affinity: {} diff --git a/manifests/pipeline/pipeline.yaml b/manifests/pipeline/pipeline.yaml index c66b20d..8eca4d3 100644 --- a/manifests/pipeline/pipeline.yaml +++ b/manifests/pipeline/pipeline.yaml @@ -83,4 +83,4 @@ spec: resources: inputs: - name: git-source - resource: git-source \ No newline at end of file + resource: git-source diff --git a/manifests/pipeline/pipelineRun.yaml b/manifests/pipeline/pipelineRun.yaml index 998feda..b9d714c 100644 --- a/manifests/pipeline/pipelineRun.yaml +++ b/manifests/pipeline/pipelineRun.yaml @@ -16,14 +16,15 @@ spec: - name: pathToContext value: "." - name: imageUrl-a - value: "beppeserver-a" + value: "gs://BUCKETNAME/server-a" - name: imageTag-a - value: "beppeserver-a-tag" + value: "release" - name: pathToContext-a value: "./serverA" - name: imageUrl-b - value: "beppeserver-b" + value: "gs://BUCKETNAME/server-b" - name: imageTag-b - value: "beppeserver-b-tag" + value: "release" - name: pathToContext-b - value: "./serverB" \ No newline at end of file + value: "./serverB" + diff --git a/manifests/resources/git.yaml b/manifests/resources/git.yaml index 106c6f4..e9cebd3 100644 --- a/manifests/resources/git.yaml +++ b/manifests/resources/git.yaml @@ -9,4 +9,4 @@ spec: - name: revision value: master - name: url - value: https://github.com/beppevanrolleghem/cicdTest \ No newline at end of file + value: git://github.com/beppevanrolleghem/cicdTest \ No newline at end of file diff --git a/manifests/tasks/build-and-push.yaml b/manifests/tasks/build-and-push.yaml index 88d2f97..2afcf5b 100644 --- a/manifests/tasks/build-and-push.yaml +++ b/manifests/tasks/build-and-push.yaml @@ -27,4 +27,7 @@ spec: args: - "--dockerfile=dockerfile" - "--destination=$(inputs.params.imageUrl):$(inputs.params.imageTag)" - - "--context=$(inputs.resources.git-source.path)/$(inputs.params.pathToContext)/" \ No newline at end of file + - "--context=$(inputs.resources.git-source.path)/$(inputs.params.pathToContext)/" + volumeMounts: + - name: docker-config + mountPath: /kaniko/.docker/