diff --git a/incubator/artifactory/templates/NOTES.txt b/incubator/artifactory/templates/NOTES.txt index a843761600..e8efa804a9 100644 --- a/incubator/artifactory/templates/NOTES.txt +++ b/incubator/artifactory/templates/NOTES.txt @@ -1,5 +1,21 @@ -Artifactory can be accessed via port 8081 on the following DNS name from within your cluster: -{{ template "fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local +Get the Artifactory URL to visit by running these commands in the same shell: +{{- if contains "NodePort" .Values.ServiceType }} + export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ template "fullname" . }}) + export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}") + echo http://$NODE_IP:$NODE_PORT/ + +{{- else if contains "LoadBalancer" .Values.ServiceType }} +**** NOTE: It may take a few minutes for the LoadBalancer IP to be available. **** +**** You can watch the status of by running 'kubectl get svc -w {{ template "fullname" . }}' **** + export SERVICE_IP=$(kubectl get svc {{ template "fullname" . }} --namespace {{ .Release.Namespace }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}") + echo http://$SERVICE_IP:{{ .Values.httpPort }}/ + +{{- else if contains "ClusterIP" .Values.ServiceType }} + export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "fullname" . }}" -o jsonpath="{.items[0].metadata.name}") + echo http://127.0.0.1:{{ .Values.httpPort }} + kubectl port-forward $POD_NAME {{ .Values.httpPort }}:{{ .Values.httpPort }} + +{{- end }} Default credential for Artifactory: user: admin diff --git a/incubator/artifactory/templates/deployment.yaml b/incubator/artifactory/templates/deployment.yaml index b1fbf3170c..be8c69c67f 100644 --- a/incubator/artifactory/templates/deployment.yaml +++ b/incubator/artifactory/templates/deployment.yaml @@ -1,19 +1,11 @@ apiVersion: extensions/v1beta1 kind: Deployment metadata: - # This uses a "fullname" template (see _helpers) - # Basing names on .Release.Name means that the same chart can be installed - # multiple times into the same namespace. name: {{template "fullname" .}} labels: app: {{ template "fullname" . }} - # The "heritage" label is used to track which tool deployed a given chart. - # It is useful for admins who want to see what releases a particular tool - # is responsible for. heritage: "{{ .Release.Service }}" - # This makes it easy to search for all components of a release using kubectl. release: "{{ .Release.Name }}" - # This makes it easy to audit chart usage. chart: "{{.Chart.Name}}-{{.Chart.Version}}" spec: replicas: {{default 1 .Values.replicaCount}} @@ -25,10 +17,6 @@ spec: spec: containers: - name: {{ template "fullname" . }} - # Making image configurable is not necessary. Making imageTag configurable - # is a nice option for the user. Especially in the strange cases like - # artifactory where the base distro is determined by the tag. Using :latest - # is frowned upon, using :stable isn't that great either. image: "{{default "docker.bintray.io/jfrog/artifactory-oss" .Values.image}}:{{default "4.14.1" .Values.imageTag}}" imagePullPolicy: {{default "IfNotPresent" .Values.ImagePullPolicy}} resources: @@ -36,7 +24,6 @@ spec: ports: - containerPort: 8081 name: http - # This (and the volumes section below) mount the config map as a volume. volumeMounts: - name: etc mountPath: /var/opt/jfrog/artifactory/etc diff --git a/incubator/artifactory/templates/svc.yaml b/incubator/artifactory/templates/svc.yaml index c84dc64947..b211ebb5cc 100644 --- a/incubator/artifactory/templates/svc.yaml +++ b/incubator/artifactory/templates/svc.yaml @@ -6,6 +6,7 @@ metadata: heritage: {{ .Release.Service | quote }} release: {{ .Release.Name | quote }} chart: "{{.Chart.Name}}-{{.Chart.Version}}" + app: {{template "fullname" .}} spec: ports: - port: {{default 8081 .Values.httpPort}} diff --git a/incubator/artifactory/values.yaml b/incubator/artifactory/values.yaml index 09ef1699f4..8be4d538bd 100644 --- a/incubator/artifactory/values.yaml +++ b/incubator/artifactory/values.yaml @@ -15,7 +15,7 @@ httpPort: 8081 ## Kubernetes configuration ## For minikube, set this to NodePort, elsewhere use LoadBalancer ## -ServiceType: LoadBalancer +ServiceType: ClusterIP resources: requests: memory: 2048Mi diff --git a/stable/jenkins/values.yaml b/stable/jenkins/values.yaml index ce6e8553d1..aa45fcbea1 100644 --- a/stable/jenkins/values.yaml +++ b/stable/jenkins/values.yaml @@ -17,7 +17,7 @@ Master: # JavaOpts: "-Xms512m -Xmx512m" ServicePort: 8080 # For minikube, set this to NodePort, elsewhere use LoadBalancer - ServiceType: LoadBalancer + ServiceType: ClusterIP ContainerPort: 8080 SlaveListenerPort: 50000