- https://igorzhivilo.com
- @warolv
- @igorzhivilo
View k8s-api-curl.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Playing with k8s API | |
### Prerequisites: existing k8s cluster, using 'EKS' in my case: | |
### Create serviceAccount: 'play-with-k8s-api' | |
kubectl -n default create serviceaccount play-with-k8s-api | |
### Create secret for 'play-with-k8s-api' SA: | |
#### Using version 1.24 -> need to create secret manually for SA |
View all.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: v1 | |
kind: ServiceAccount | |
metadata: | |
name: httpbin | |
namespace: play-with-fargate | |
--- | |
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: httpbin |
View echoserver.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: echoserver | |
spec: | |
ports: | |
- port: 80 | |
targetPort: 8080 | |
selector: | |
app: echoserver |
View eks-cluster.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ApiVersion: eksctl.io/v1alpha5 | |
kind: ClusterConfig | |
metadata: | |
name: eks-ci-cd | |
region: us-east-1 | |
vpc: | |
subnets: | |
private: | |
us-east-1a: | |
id: "subnet-private-id1" |
View exampe.coffee
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
angular.element(document).ready -> |
View gemfile.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source 'https://rubygems.org' | |
ruby '2.0.0' | |
gem 'rails', '4.0.1' | |
group :production do | |
gem 'pg' | |
gem 'rails_12factor' | |
end |
View example.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rake generate # Generates posts and pages into the public directory | |
rake watch # Watches source/ and sass/ for changes and regenerates | |
rake preview # Watches, and mounts a webserver at http://localhost:4000 | |
rake 'new_post["Building Form Ajax Validator"]' # Generate new post | |
# Create a new page | |
rake new_page[super-awesome] | |
rake new_page[super-awesome/page.html] | |
View example.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Post.all.index_by { |post| post.id } | |
# => { 1 => #<Post ...>, 2 => #<Post ...>, ... } | |
Post.all.index_by(&:title) | |
# => { "My first post" => #<Post ...>, "My second post" => #<Post ...>, ... } |
View en.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
branding_logo_link: "To select branding logo for your business %{text}" |
View en.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
branding_logo_link: "To select branding logo for your business %{link:click}" |
NewerOlder